Dockerfile

keyword effect remarks
FROM Specify the parent image Appoint dockerfile Based on that image structure
MAINTAINER The author information Used to mark this dockerfile Who wrote it
LABEL label Used to indicate dockerfile The label of have access to Label Instead of Maintainer It's all in the end docker image Basic information can be viewed in
RUN Carry out orders Execute a command The default is /bin/sh Format : RUN command perhaps RUN ["command" , "param1","param2"]
CMD Container start command Provides the default command to start the container and ENTRYPOINT In combination with . Format CMD command param1 param2 perhaps CMD ["command" , "param1","param2"]
ENTRYPOINT entrance It is usually used in containers that are closed immediately after execution
COPY Copy file build Copy files to image in
ADD Add files build Add files to image in It's not just about the present build Context It can come from remote services
ENV environment variable Appoint build The environment variables at that time You can start the container adopt -e Cover Format ENV name=value
ARG Build parameters Build parameters Parameters used only at build time If there is ENV that ENV Values with the same name are always overridden arg Parameters of
VOLUME Define data volumes that can be mounted externally Appoint build Of image Those directories can be mounted to the file system when they are started Use when starting a container -v binding Format VOLUME [" Catalog "]
EXPOSE Exposed port Define the port that the container listens to when it is running Start the use of the container -p To bind exposed ports Format : EXPOSE 8080 perhaps EXPOSE 8080/udp
WORKDIR working directory Specify the working directory inside the container If not, automatically create If specified / It's an absolute address If not / At the beginning, that's the last one workdir The relative path of the path
USER Specify the executing user Appoint build Or when it starts user stay RUN CMD ENTRYPONT The user at the time of execution
HEALTHCHECK health examination Specifies the command to monitor the health monitoring of the current container It's basically useless Because a lot of times The application itself has a health monitoring mechanism
ONBUILD trigger When it exists ONBUILD When the keyword image is used as the basic image When executed FROM When it's done Will execute ONBUILD The order of But it doesn't affect the current image It's not very useful
STOPSIGNAL Send semaphore to host The STOPSIGNAL Instruction sets the system call signal that will be sent to the container to exit .
SHELL Specifies the shell Appoint RUN CMD ENTRYPOINT When executing an order The use of shell

DockerFile Keyword related role and explain more related articles

  1. serialize 、 Deserialize and transient The role of keywords

    introduction take Java Object serialized to binary Java Serialization technology is Java A more important technology point in series technology , In most cases , Developers only need to understand that the serialized classes need to be implemented Serializable Interface , ...

  2. Java Keywords and their functions

    Java Keywords and their functions One .  Keyword Overview Access control private protected public             class , Method and variable modifiers abstract class extends fin ...

  3. 【Java One of the study notes 】java Keywords and functions

    Java Keywords and their functions One . The overview : Access control private protected public class , Method and variable modifiers abstract class extends final implements ...

  4. JAVA Keywords and functions

    --- Resume content start --- Java Keywords and their functions One . The overview : Access control private protected public class , Method and variable modifiers abstract class extends fina ...

  5. volatile The role of keywords 、 principle

    In only double check lock , No, volatile In lazy loading singleton mode , Due to the reordering of instructions , I really won't get two different cases , But I'll get " Half " Single case . And what works miraculously volatile, You can take it as ...

  6. Interview questions :volatile The role of keywords 、 principle

    In only double check lock , No, volatile In lazy loading singleton mode , Due to the reordering of instructions , I really won't get two different cases , But I'll get “ Half ” Single case . And what works miraculously volatile, It is worthy to be called Java ...

  7. 【Java One of the study notes 】 java Keywords and functions

    Java Keywords and their functions One . The overview : Access control private protected public class , Method and variable modifiers abstract class extends final implements ...

  8. Java Object representation 1: serialize 、 Deserialize and transient The role of keywords

    Usually we are Java Objects in memory , It's impossible IO Operation or network communication , Because it's going on IO Operation or network communication , People don't know what the object in memory is , So the object has to be represented in some way , That is to store the state in the object . One ...

  9. Java Notes on concurrent programming In depth understanding of volatile The role of keywords

    introduction : I've just seen the introduction before volatile The article , The understanding of it just stays at the level of theory , Due to the recent use of concurrency technology in the project , So I'm determined to study it in depth java Knowledge of concurrency . About online volatile Of ...

  10. java in final The role of keywords

    final The role of keywords java Medium final Keywords can be used to declare member variables . The local variable . class . Method , And often with static Use declaration constants together . final The meaning of keywords : final stay Java Middle is a reserved pass ...

Random recommendation

  1. rsync Synchronization architecture

    1.1 rsync Server side configuration 1.1.1 Look at the server side rsync edition 1.1.2  create profile Installed by default rsync After procedure , It doesn't automatically create rsync Primary profile for , It needs to be created manually , Its main configuration file is “/e ...

  2. tomcat Source code analysis ( 3、 ... and ) once http Requested travel - from Socket Speaking of

    p { margin-bottom: 0.25cm; line-height: 120% } tomcat Source code analysis ( 3、 ... and ) once http Requested travel stay http Before asking to travel , Let's prepare the tools we need first . ...

  3. Sublime Text How the editor hides the top menu bar

    Before hiding : terms of settlement : 1. Hold down Ctrl+Shifp+p, A box appears , Enter... In the box “view:”, The following interface appears 2. choice :“View:Toggle Menu” that will do . The result is : Be accomplished !!!!

  4. Descriptive statistics - The number of Mode

    Definition - Numerical data - The most frequent variable value - Quality data . Monomial grouping of data - The most frequent group is the crowd array , The variable values of this group ( type ) It's the mode - Group spacing grouping data - The most frequent group is the crowd array , Get the mode through the formula - Male ...

  5. vim The order added (1)

    This article mainly teaches you how to use  Vim  Split screen function . Split screen start Vim Use uppercase O Parameters to split the screen vertically . vim -On file1 file2 ... Use lowercase o Parameters to split the screen horizontally . vim -on file1 f ...

  6. php Make it easy to spell

    <blockquote>model::::::::::::::::::::::::::::: function getFirstCharter($str){if(empty($str)){ ...

  7. install win10 and win Some of the miscellaneous issues in

    reg Medium policies It's policy / Strategy , Mainly refers to Some control items in the control panel , among explorer yes The control panel's Display item ... DWORD Value is a 32 position (4 Bytes : That is, double characters ) The number of lengths , It's the number. ...

  8. MyEclipse Reverse generation Java Code ,Reverse Engineering--&gt;Java Source Folder--&gt; No entry was provided

    stay web On the name of the project , Do it manually Add Hibernate Capabilities, Then go again. DB Browser Reverse generation in pojo Entity classes and hbm.xml The mapping file !, The configuration of reverse code generation is shown in the figure below ...

  9. Vue2.5 Develop where to go App City list development Brother component linkage and list performance optimization

    One ,  Linkage between brother components 1.  Click the city letter , Corresponding display on the left For traversing Letter Add a click event : Alphabet.vue @click="handleLetterClick" ha ...

  10. Docker introduction It's the basic order

    3 Docker introduction First, make sure docker Successfully installed on Linux or windows In the system We can use docker info see docker Successful installation and normal operation Run our first docker ...