March 2020
Beginner
592 pages
14h 14m
English
In this step, we make sure all source files and other artifacts needed to successfully build the application are part of the image. Here, we mainly use the two keywords of the Dockerfile: COPY and ADD. Initially, the structure of the source inside the image should look exactly the same as on the host, to avoid any build problems. Ideally, you would have a single COPY command that copies all of the root project folder from the host into the image. The corresponding Dockerfile snippet could then look as simple as this:
WORKDIR /appCOPY . .
Read now
Unlock full access