CHEATSHEET: Dockerfile - Basic Syntax and Concepts
published on Fri May 15 2020Instructions
FROM- initializes a new build stage and sets the base image for subsequent instructionsRUN- will execute any commands in a new layer on top of the current image and commit the results which will be used for the next step in theDockerfileCMD- used to provide defaults for an executing container such as an executable and its argumentsCOPY <src> <dest>- copies new files or directories from<src>and adds them to the filesystem of the container at the path<dest>WORKDIR- sets the working directory to the specified directory for following instructions in theDockerfile