Skip to content

Commit

Permalink
Update Dockerfiles for Python 3.11 installation
Browse files Browse the repository at this point in the history
Added lines in Dockerfiles to install Python 3.11 and set the PYTHONNET_PYDLL environment variable. This enhancement helps to ensure compatibility with recent Python updates and improves general performance.
  • Loading branch information
sfmskywalker committed Dec 27, 2023
1 parent 062158b commit e0b9356
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
7 changes: 4 additions & 3 deletions docker/ElsaServer.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,13 @@ COPY --from=build /app/publish ./
# Install Python 3.11
RUN apt-get update && apt-get install -y --no-install-recommends \
python3.11 \
python3.11-dev \
libpython3.11 \
python3-pip && \
rm -rf /var/lib/apt/lists/* && \
ln -s /usr/bin/python3.11 /usr/bin/python
rm -rf /var/lib/apt/lists/*

# Set PYTHONNET_PYDLL environment variable
ENV PYTHONNET_PYDLL /usr/bin/python3.11
ENV PYTHONNET_PYDLL /usr/lib/aarch64-linux-gnu/libpython3.11.so

EXPOSE 80/tcp
EXPOSE 443/tcp
Expand Down
11 changes: 11 additions & 0 deletions docker/ElsaServerAndStudio.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,17 @@ 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.11-dev \
libpython3.11 \
python3-pip && \
rm -rf /var/lib/apt/lists/*

# Set PYTHONNET_PYDLL environment variable
ENV PYTHONNET_PYDLL /usr/lib/aarch64-linux-gnu/libpython3.11.so

EXPOSE 80/tcp
EXPOSE 443/tcp
ENTRYPOINT ["dotnet", "Elsa.ServerAndStudio.Web.dll"]

0 comments on commit e0b9356

Please sign in to comment.