Skip to content

Instantly share code, notes, and snippets.

@dmilan77
Last active August 7, 2019 23:12
Show Gist options
  • Save dmilan77/c11cc41332115bb4da1b0629a088cd13 to your computer and use it in GitHub Desktop.
Save dmilan77/c11cc41332115bb4da1b0629a088cd13 to your computer and use it in GitHub Desktop.
2a. Docker Lab

Test your docker setup

docker run hello-world

You should see an output "Hello from Docker"

$ docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
1b930d010525: Pull complete
Digest: sha256:6540fc08ee6e6b7b63468dc3317e3303aae178cb8a45ed3123180328bcc1d20f
Status: Downloaded newer image for hello-world:latest

Hello from Docker!
This message shows that your installation appears to be working correctly.

Run your docker

export DOCKERID="<SET YOUR DOCKER ID>"
export DOCKERID="dmilan"
export PROJECT_DIR=~/project/kubeatl/dockerlab
mkdir -p ${PROJECT_DIR}
cd ${PROJECT_DIR}
git clone https://github.com/dmilan77/docker-sample-restapp-flask.git
cd docker-sample-restapp-flask
docker build -t ${DOCKERID}/docker-sample-restapp-flask .
docker run -it -p 8080:8080 ${DOCKERID}/docker-sample-restapp-flask


Test your docker curl localhost:8080/ping

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment