Minimal Dockerfile example

This is a minimal Dockerfile that you can use to build a test container:

example-4.dockerfile
CMD ["/bin/sh", "-c", "echo 'It works!'"]

Build example:

example-3.sh

Run example:

example-2.sh

Example output:

example-1.txt
It works!

 


Check out similar posts by category: Docker