December 2019
Intermediate to advanced
510 pages
11h 33m
English
Let's proceed by describing the Dockerfile of our compose project. As mentioned previously, the Dockerfile is a simple text file that contains the commands a user could call to assemble an image. Let's examine a possible definition of the Dockerfile contained in the containers/api/ folder:
FROM mcr.microsoft.com/dotnet/core/sdk:3.1.100COPY . /appWORKDIR /appRUN dotnet restoreRUN dotnet buildRUN dotnet tool install --global dotnet-efENV PATH="${PATH}:/root/.dotnet/tools"RUN chmod +x containers/api/entrypoint.shCMD /bin/bash containers/api/entrypoint.sh
This code defines specific steps to build the Docker image. The FROM directive refers to the base image to use during the build process. This directive is mandatory, ...
Read now
Unlock full access