...
Let's say we want to use the Smartstore Community Edition Docker Image, but have a self-developed or thirdparty third party plugin that we also want to use. How do we get the new plugin into the Docker image?
...
For the Docker image we need the Linux release of Smartstore.
...
After downloading, we unpack the contents of the file Smartstore.Community.5.0.1.linux-x64.zip
(newer versions will have a different name) into a subfolder. The We create a subfolder, name is not relevant, I simply named the folder build_my_docker_image
.
...
Here we create another folder called smartstore-linux-x64
and unpack the contents of the file into this folder.
...
We place our own or thiry-third party plugin in the \Modules
folder in the \smartstore-linux-x64
folder. Not as a zip file, but unpacked.
...
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 EDITION=Community ARG VERSION=5.0.1 ARG RUNTIME=SOURCE=/smartstore-linux-x64 ARG SOURCE=/${EDITION}.${VERSION}.${RUNTIME} 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; |
...