- Deployment with Docker
- Srdjan Grubor
- 223字
- 2021-07-02 23:22:15
Dockerfile commands
The following list is a similar one, but this time, we are covering the commands you can use in a Dockerfile, and we've arranged it in an order similar to the one you would use when working within the Dockerfile:
FROM <image_name>[:<tag>]: Base the current image on <image_name>
LABEL <key>=<value> [<key>=value>...]: Add metadata to the image
EXPOSE <port>: Indicate which port should be mapped into the container
WORKDIR <path>: Set the current directory for the following commands
RUN <command> [ && <command>... ]: Execute one or more shell commands
ENV <name>=<value>: Set an environment variable to a specific value
VOLUME <path>: Indicates that the <path> should be externally mounted volume
COPY <src> <dest>: Copy a local file, a group of files, or a folder into the container
ADD <src> <dest>: The same as COPY but can handle URIs and local archives
USER <user | uid>: Set the runtime context to <user> or <uid> for commands after this one
CMD ["<path>", "<arg1>", ...]: Define the command to run when the container is started
Since almost all containers you would want to build can be constructed with this set, this list is not the whole superset of Docker commands, and a few of them have been intentionally left out. If you get curious about things such as ENTRYPOINT, ARG, HEALTHCHECK, or others, you can check out the complete documentation at https://docs.docker.com/engine/reference/builder/.
- 基于LabWindows/CVI的虛擬儀器設(shè)計與應(yīng)用
- 21天學通ASP.NET
- 可編程控制器技術(shù)應(yīng)用(西門子S7系列)
- 觸控顯示技術(shù)
- Storm應(yīng)用實踐:實時事務(wù)處理之策略
- 在實戰(zhàn)中成長:Windows Forms開發(fā)之路
- Unity Multiplayer Games
- Apache源代碼全景分析(第1卷):體系結(jié)構(gòu)與核心模塊
- 典型Hadoop云計算
- C#求職寶典
- Hadoop Beginner's Guide
- 西門子S7-1200/1500 PLC從入門到精通
- Advanced Deep Learning with Keras
- Hands-On Generative Adversarial Networks with Keras
- Keras Reinforcement Learning Projects