wherentals.blogg.se

Docker windows base image dockerfile example
Docker windows base image dockerfile example








docker windows base image dockerfile example

USER in Dockerfile Instruction is used to set the user name and UID when running container VOLUME in Dockerfile Instruction is used to create or mount volume to docker container. It is used downloading remote resources, extracting TAR/ZIP files.Įxample 1: ADD java/jdk-8u231-linux-圆4.tar /opt/jdk/ĬOPY in Dockerfile Instruction used to Copies a file or directory from your host to Docker image, It is used to simply copying files or directories into the build context.Įxample 1: # To Install All dependencies for Node.js AppĮNTRYPOINT in Dockerfile Instruction is used you to configure a container that you can run as an executable.ĮNTRYPOINT specifies a commands that will executes when the Docker container starts. LABEL in Dockerfile Instruction is used to specify metadata information of Docker Image.ĮXPOSE in Dockerfile Instruction is used to specify Network port for Docker containerĮxample 1: # To Expose port 80 of Docker containerĮNV in Dockerfile Instruction is used to set Environment Variables with key and value.ĪDD: Copies a file and directory from your host to Docker image, however can also fetch remote URLs, extract TAR/ZIP files, etc. sh(shell script) file inside Dockerfile COPY test.sh.

docker windows base image dockerfile example

RUN executes the command when you are building Image.

docker windows base image dockerfile example

RUN in Dockerfile Instruction is used to execute any commands on top of current Docker Image MAINTAINER in Dockerfile Instruction is used to about the person who creates the Docker ImageĬMD in Dockerfile Instruction is used to execute a command in Running container, There should be one CMD in a Dockerfile.ĬMD executes the commands when your Docker Image is deployed.Įxample 1: # To run apache2 in foregroundĬMD Dockerfile contains a set of Instructions to build Docker Image -> from Docker Image -> running Docker container Dockerfile Instructions with ExamplesįROM in Dockerfile Instruction used to specify Docker Image Name and start the build process










Docker windows base image dockerfile example