#20 Docker Tutorial | Dockerfile Run

Published: 02 September 2020
on channel: One Minute Notes
184
9

Docker playlist
   • Playlist  

Dockerfile Keywords(LABEL, ENV, RUN, WORKDIR)

1.RUN: The RUN instruction will execute any commands in a new layer on top of the current image and commit the result.

2.ENV: The ENV instruction sets the environment variable key to the value. The value will be in the environment for all subsequent instructions in the build stage and can be replaced inline in many as well.

3.LABEL: The LABEL instruction adds metadata to an image. A label is a key-value pair. To include spaces within a LABEL value, use quotes and backslashes as you would in command-line parsing.

4.WORKDIR: the WORKDIR instruction sets the working directory for any RUN, CMD, ENTRYPOINT, COPY, and ADD instructions that follow it in the Dockerfile. If the WORKDIR doesn't exist, it will be created even if it's not used in any subsequent Dockerfile instruction.
--------------------------------------
LABEL name="suraj kelhe"
LABEL email="[email protected]"

ENV NAME suraj
ENV PASS password

RUN pwd /tmp/1stpwd.txt
RUN cd /tmp/
RUN pwd /tmp/2ndpwd.txt

WORKDIR /tmp/
RUN pwd /tmp/2ndpwd.txt
-------------------------------
To support us
Like , Share, Subscribe

#dockerfile
#devops


Watch video #20 Docker Tutorial | Dockerfile Run online without registration, duration hours minute second in high quality. This video was added by user One Minute Notes 02 September 2020, don't forget to share it with your friends and acquaintances, it has been viewed on our site 184 once and liked it 9 people.