Docker version 18.03.0-ce, build 0520e24302
NAME DESCRIPTION STARS OFFICIAL AUTOMATED
ubuntu Ubuntu is a Debian-based Linux operating sys… 9041 [OK]
dorowu/ubuntu-desktop-lxde-vnc Ubuntu with openssh-server and NoVNC 260 [OK]
rastasheep/ubuntu-sshd Dockerized SSH service, built on top of offi… 195 [OK]
consol/ubuntu-xfce-vnc Ubuntu container with "headless" VNC session… 147 [OK]
ansible/ubuntu14.04-ansible Ubuntu 14.04 LTS with ansible 95 [OK]
ubuntu-upstart Upstart is an event-based replacement for th… 93 [OK]
neurodebian NeuroDebian provides neuroscience research s… 55 [OK]
1and1internet/ubuntu-16-nginx-php-phpmyadmin-mysql-5 ubuntu-16-nginx-php-phpmyadmin-mysql-5 48 [OK]
ubuntu-debootstrap debootstrap --variant=minbase --components=m… 40 [OK]
nuagebec/ubuntu Simple always updated Ubuntu docker images w… 23 [OK]
tutum/ubuntu Simple Ubuntu docker images with SSH access 18
i386/ubuntu Ubuntu is a Debian-based Linux operating sys… 16
1and1internet/ubuntu-16-apache-php-7.0 ubuntu-16-apache-php-7.0 13 [OK]
ppc64le/ubuntu Ubuntu is a Debian-based Linux operating sys… 12
1and1internet/ubuntu-16-nginx-php-5.6-wordpress-4 ubuntu-16-nginx-php-5.6-wordpress-4 7 [OK]
eclipse/ubuntu_jdk8 Ubuntu, JDK8, Maven 3, git, curl, nmap, mc, … 7 [OK]
codenvy/ubuntu_jdk8 Ubuntu, JDK8, Maven 3, git, curl, nmap, mc, … 5 [OK]
darksheer/ubuntu Base Ubuntu Image -- Updated hourly 5 [OK]
pivotaldata/ubuntu A quick freshening-up of the base Ubuntu doc… 2
1and1internet/ubuntu-16-sshd ubuntu-16-sshd 1 [OK]
smartentry/ubuntu ubuntu with smartentry 1 [OK]
ossobv/ubuntu Custom ubuntu image from scratch (based on o… 0
1and1internet/ubuntu-16-healthcheck ubuntu-16-healthcheck 0 [OK]
pivotaldata/ubuntu-gpdb-dev Ubuntu images for GPDB development 0
paasmule/bosh-tools-ubuntu Ubuntu based bosh-cli 0 [OK]
Using default tag: latest
latest: Pulling from library/ubuntu
84ed7d2f608f: Pull complete
be2bf1c4a48d: Pull complete
a5bdc6303093: Pull complete
e9055237d68d: Pull complete
Digest: sha256:868fd30a0e47b8d8ac485df174795b5e2fe8a6c8f056cc707b232d65b8a1ab68
Status: Downloaded newer image for ubuntu:latest
REPOSITORY TAG IMAGE ID CREATED SIZE
ubuntu latest 1d9c17228a9e 8 days ago 86.7MB
root@59954db08b43:/# uname -a
Linux 59954db08b43 4.14.79-boot2docker #1 SMP Thu Nov 8 01:56:42 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
59954db08b43 ubuntu "/bin/bash" About an hour ago Up About an hour xenodochial_morse
df2e13c45fa6 ubuntu "/bin/bash" About an hour ago Exited (0) About an hour ago confident_feynman
eb51172d9f86 ubuntu "/bin/bash" About an hour ago Exited (127) About an hour ago tender_shirley
from flask import Flask
from redis import Redis, RedisError
import os
import socket
# Connect to Redis
redis = Redis(host="redis", db=0, socket_connect_timeout=2, socket_timeout=2)
app = Flask(__name__)
@app.route("/")
def hello():
try:
visits = redis.incr("counter")
except RedisError:
visits = "<i>cannot connect to Redis, counter disabled</i>"
html = "<h3>Hello {name}!</h3>" \
"<b>Hostname:</b> {hostname}<br/>" \
"<b>Visits:</b> {visits}"
return html.format(name=os.getenv("NAME", "world"), hostname=socket.gethostname(), visits=visits)
if __name__ == "__main__":
app.run(host='0.0.0.0', port=80)
$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
friendlyhello latest d24a394ec9eb 41 minutes ago 131MB