Created
January 13, 2017 12:27
-
-
Save szukalski/0cd53f2ea10d4d909943d3f57ccdeaad to your computer and use it in GitHub Desktop.
Docker - Create custom image
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
WORKING_DIR=$HOME/docker_work | |
DOCKER_NAME=hello-world | |
docker pull ubuntu | |
mkdir -p $WORKING_DIR | |
cat << 'EOF' > $WORKING_DIR/Dockerfile | |
FROM ubuntu | |
RUN apt-get -y update && apt-get -y upgrade | |
CMD echo "Hello, World!" | |
EOF | |
docker build -t $DOCKER_NAME $WORKING_DIR | |
docker run $DOCKER_NAME |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment