Docker : Use Dockerfile#1


Use Dockerfile and create Docker images automatically.
It is also useful for configuration management.
[1]The format of Dockerfile is [INSTRUCTION arguments] .
Refer to the following description for INSTRUCTION.
INSTRUCTIONDescription
FROMiIt sets the Base Image for subsequent instructions.
MAINTAINERIt sets the Author field of the generated images.
RUNIt will execute any commands when Docker image will be created.
CMDIt will execute any commands when Docker container will be executed.
ENTRYPOINTIt will execute any commands when Docker container will be executed.
LABELIt adds metadata to an image.
EXPOSEIt informs Docker that the container will listen on the specified network ports at runtime.
ENVIt sets the environment variable.
ADDIt copies new files, directories or remote file URLs.
COPYIt copies new files or directories.
The differences of [ADD] are that it's impossible to specify remore URL and also it will not extract archive files automatically.
VOLUMEIt creates a mount point with the specified name and marks it as holding externally mounted volumes from native host or other containers
USERIt sets the user name or UID.
WORKDIRIt sets the working directory.

No comments:

Post a Comment