Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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-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).

...

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"]

...