Dockerfile

testfile

As you’re writing your Dockerfile, it may be helpful to run the commands against a real
image as you go, so that you can more easily predict what’s happening. Here is how to do
that:

docker pull debian:latest
docker run -t -i debian:latest /bin/bash

If you want to generate a docker image based off of what you did in the interactive session
vs a Dockerfile, you can take note of the image id in the console after root. E.g.
root@28934273 # specifies the user is root and the image id is 28934273. Then, you can
run whatever commands you’d like, exit the session, and run the following:

You can use the image you just created as a base image in another of your Dockerfiles, so that
you can interactively set up your image initially, and then in the second step, add any CMD
statements to actually run your software.