Execute a command during image build.
Section: Dockerfile Basics
Run build step
dockerfile
dockerfile
RUN npm ciExplanation
Common for dependency installation and image preparation.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Dockerfile Basics
Build from Dockerfile
Build an image from the Dockerfile in the current directory.
Build with alternate Dockerfile
Build using an alternate Dockerfile path.
Use WORKDIR instruction
Set the working directory for subsequent instructions.
Copy files into image
Copy files from the build context into the image.
Set default command
Set the default command when the container starts.