[Three] use Dockerfile build Docker image

Dockerfile is a text file that describes the Docker process of building a mirror needed, including the installation package, create a folder, define the environment variable and some other operations.
 
 

1, create Dockerfile file named Dockerfile

FROM busybox 
ENV foo=bar

2, build command execution

  • docker build -t busybox2. Docker mirror constructed using Dockerfile

The representative of the current directory ( Dockerfile in the current directory )

 
 
 
 
Published 33 original articles · won praise 16 · views 70000 +

Guess you like

Origin blog.csdn.net/SwTesting/article/details/104064334