Skip to content

Commit

Permalink
Update Dockerfiles and add Python 3.11
Browse files Browse the repository at this point in the history
Working directories in both ElsaServer.Dockerfile and ElsaServerAndStudio.Dockerfile have been updated for better consistency. Additionally, Python 3.11 has been installed in the ElsaServer.Dockerfile, accompanied by relevant environment variables and symbolic links to improve interoperability.
  • Loading branch information
sfmskywalker committed Dec 27, 2023
1 parent 3454ca0 commit 062158b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
12 changes: 11 additions & 1 deletion docker/ElsaServer.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ COPY *.props ./
RUN dotnet restore "./src/bundles/Elsa.Server.Web/Elsa.Server.Web.csproj"

# build and publish (UseAppHost=false creates platform independent binaries).
WORKDIR /source/src/bundles/Elsa.AllInOne.Web
WORKDIR /source/src/bundles/Elsa.Server.Web
RUN dotnet build "Elsa.Server.Web.csproj" -c Release -o /app/build
RUN dotnet publish "Elsa.Server.Web.csproj" -c Release -o /app/publish /p:UseAppHost=false --no-restore -f net8.0

Expand All @@ -19,6 +19,16 @@ FROM mcr.microsoft.com/dotnet/aspnet:8.0-bookworm-slim AS base
WORKDIR /app
COPY --from=build /app/publish ./

# Install Python 3.11
RUN apt-get update && apt-get install -y --no-install-recommends \
python3.11 \
python3-pip && \
rm -rf /var/lib/apt/lists/* && \
ln -s /usr/bin/python3.11 /usr/bin/python

# Set PYTHONNET_PYDLL environment variable
ENV PYTHONNET_PYDLL /usr/bin/python3.11

EXPOSE 80/tcp
EXPOSE 443/tcp
ENTRYPOINT ["dotnet", "Elsa.Server.Web.dll"]
2 changes: 1 addition & 1 deletion docker/ElsaServerAndStudio.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ RUN dotnet restore "./src/bundles/ElsaStudioWebAssembly/ElsaStudioWebAssembly.cs
RUN dotnet restore "./src/bundles/Elsa.ServerAndStudio.Web/Elsa.ServerAndStudio.Web.csproj"

# build and publish (UseAppHost=false creates platform independent binaries).
WORKDIR /source/src/bundles/Elsa.AllInOne.Web
WORKDIR /source/src/bundles/Elsa.ServerAndStudio.Web
RUN dotnet build "Elsa.ServerAndStudio.Web.csproj" -c Release -o /app/build
RUN dotnet publish "Elsa.ServerAndStudio.Web.csproj" -c Release -o /app/publish /p:UseAppHost=false --no-restore -f net8.0

Expand Down

0 comments on commit 062158b

Please sign in to comment.