Versions Compared

Key

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

...

The snippet above should be saved as a simple text file called Dockerfile. To build an image from it, I would recommend putting it in a dedicated folder, e.g.:

 

 

 

Code Block
languagebash
themeMidnight
titleBuild image
linenumberstrue
collapsetrue
mkdir ~/docker/myproject 
mv Dockerfile ~/docker/myproject/Dockerfile

 

Then change working directory to the newly created folder and build the image:

 

 

 

Code Block
languagebash
themeMidnight
titleChange working directory and build image
collapsetrue
cd ~/docker/myproject 

docker build -t <image_name> . 

 

 

 

 

 



3 - 






 

Info

...