Installation on Docker (Connect 2024)
Installation on Docker
The Connect Server can be operated under Docker. On Windows, only the "modern" Docker variant (Docker with WSL2) is supported. In Docker-based environments, we recommend using the delivery as a portable .NET assembly, since the platform-specific variants of the Connect Server are not explicitly tested for this scenario.
As a basis for the creation of the image you need a Linux distribution and the current version of the ASP.NET Core 6.0 runtime environment. A corresponding image is provided by Microsoft, but you may also use a custom image created according to your own requirements.
The Connect delivery package already includes a Dockerfile for creating an image of the Connect server based on the environment for ASP.NET 6.0 provided by Microsoft.
Before creating the image, the Dockerfile can be customized to your own requirements. The following example shows a Dockerfile for creating a container with the Debian based ASP.NET Core runtime, additional network tools, an editor and the Connect Server:
FROM mcr.microsoft.com/dotnet/aspnet:7.0
LABEL Description="This image contains the Connect! Server." Vendor="Galileo Group AG" Version="2023.0.1"
RUN apt -y update
RUN apt -y upgrade
RUN apt -y install iputils-ping
RUN apt -y install net-tools
RUN apt -y install procps
RUN apt -y install vim
COPY . /connect/app
# >>> Use this to store persistent data on volume /connect/data
# Things to do before starting the container:
# - Create JSON file "appsettings" containing configuration settings (see user manual for further information)
VOLUME /connect/data
# <<<
# >>> Use this to store persistent data in container (for test purposes only!)
# RUN mkdir /connect/data
# RUN echo "{}" > /connect/data/appsettings.json
# <<<
# >>> Use this to add specific trusted root certificates
# COPY my_trusted_root_ca1.crt /usr/local/share/ca-certificates/
# COPY my_trusted_root_ca2.crt /usr/local/share/ca-certificates/
# COPY my_trusted_root_ca3.crt /usr/local/share/ca-certificates/
# RUN update-ca-certificates
# <<<
WORKDIR /connect/app
ENTRYPOINT ["dotnet", "GalileoGroup.Connect.Server.dll", "--settings=/connect/data/appsettings.json?"]
EXPOSE 80/tcp
EXPOSE 443/tcp
Creating the Docker image
To create the Docker image, change to the working directory using the cd command. Execute the following command there to create an image with the name "connect":
docker build -t connect .
Creating a Docker Container
In the following, a container named "myconnect" is created, which is based on the image "connect" and uses port 8000 for access via HTTP. To resolve server names, a DNS server must be specified for the container (192.168.1.110 in this example). Create and start the container using the following command:
docker run -d -v c:\connect\data:/connect/data -p 8000:80 --dns 192.168.1.110 --name myconnect connect
In this example, the web server inside the Docker image uses the default configuration and is accessible via HTTP on port 80. If required, an HTTPS configuration on port 443 can be added. Externally, any port can be used for the container.
To avoid keeping the persistent data inside the container, this example creates an external directory named "c:\connect\data". In this directory, a JSON file named "appsettings.json" can be created that contains the environment-specific configuration settings.
If necessary, you can add a DNS suffix by specifying the --dns-search <suffix> parameter before the --name parameter.
For more information, see the documentation at the following link: