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


buildDocker.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


$ docker exec -it ubuntu bash



  • No labels