...
Now we need the Dockerfile and the script file with the instructions for creating the Docker image. We create an empty text file in the build_my_docker_image folder with the file name Dockerfile
(without an extension, simply Dockerfile).
We create an empty text file in the build_my_docker_image
folder with the file name Dockerfile
(without an extension, just Dockerfile), copy the following content into it and save the file.
Code Block |
---|
# ----------------------------------------------------------- # Creates a Docker image from an existing build artifact # ----------------------------------------------------------- ARG ASPNET_TAG=7.0 FROM mcr.microsoft.com/dotnet/aspnet:${ASPNET_TAG} EXPOSE 80 EXPOSE 443 ENV ASPNETCORE_URLS "http://+:80;https://+:443" # Copy ARG SOURCE=/smartstore-linux-x64 WORKDIR /app COPY ${SOURCE} ./ # Install wkhtmltopdf RUN apt update &&\ apt -y install wget &&\ wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.buster_amd64.deb &&\ apt -y install ./wkhtmltox_0.12.6-1.buster_amd64.deb &&\ rm ./wkhtmltox_0.12.6-1.buster_amd64.deb ENTRYPOINT ["./Smartstore.Web", "--urls", "http://0.0.0.0:80"] |
Wir wiederholen das ganze für die Datei We repeat the whole thing for the file dockerize.linux.nobuild.sh
. Wir legen also eine neue Text-Datei an, kopieren den folgenden Inhalt hinein und speichern die Datei abSo we create a new text file, copy the following content into it and save the file.
Code Block |
---|
docker build -t smartstore-linux-image -f Dockerfile . echo 'Press enter to exit...'; read dummy; |
...