Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Overview

Having a container that just loops busy is handy for figuring out the steps required when you are building a new container. You can log into the container and perfom steps and add the successful ones to a Dockerfile.

Script


Code Block
languagebash
titlebuildDocker.sh
CONTAINER=ubuntu16
IMAGE=ubuntu:16.04
DIR=`pwd -P`

docker stop $CONTAINER
docker rm $CONTAINER
#docker rmi $IMAGE

CMD="tail -f /dev/null"

docker run -d \
--name $CONTAINER \
--restart=always \
$IMAGE \
$CMD


Log Into the Container


Code Block
$ docker exec -it ubuntu bash