-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1135 from uselagoon/add_python_313
build: add python-13 image
- Loading branch information
Showing
4 changed files
with
75 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
ARG IMAGE_REPO | ||
FROM ${IMAGE_REPO:-lagoon}/commons AS commons | ||
|
||
FROM python:3.13.0-alpine3.20 | ||
|
||
ARG LAGOON_VERSION | ||
ENV LAGOON_VERSION=$LAGOON_VERSION | ||
LABEL org.opencontainers.image.authors="The Lagoon Authors" | ||
LABEL org.opencontainers.image.source="https://github.com/uselagoon/lagoon-images/blob/main/images/python/3.13.Dockerfile" | ||
LABEL org.opencontainers.image.url="https://github.com/uselagoon/lagoon-images" | ||
LABEL org.opencontainers.image.version="${LAGOON_VERSION}" | ||
LABEL org.opencontainers.image.description="Python 3.13 image optimised for running in Lagoon in production and locally" | ||
LABEL org.opencontainers.image.title="uselagoon/python-3.13" | ||
LABEL org.opencontainers.image.base.name="docker.io/python:3.13-alpine3.20" | ||
|
||
ENV LAGOON=python | ||
|
||
# Copy commons files | ||
COPY --from=commons /lagoon /lagoon | ||
COPY --from=commons /bin/fix-permissions /bin/ep /bin/docker-sleep /bin/wait-for /bin/ | ||
COPY --from=commons /sbin/tini /sbin/ | ||
COPY --from=commons /home /home | ||
|
||
RUN fix-permissions /etc/passwd \ | ||
&& mkdir -p /home | ||
|
||
ENV TMPDIR=/tmp \ | ||
TMP=/tmp \ | ||
HOME=/home \ | ||
# When Bash is invoked via `sh` it behaves like the old Bourne Shell and sources a file that is given in `ENV` | ||
ENV=/home/.bashrc \ | ||
# When Bash is invoked as non-interactive (like `bash -c command`) it sources a file that is given in `BASH_ENV` | ||
BASH_ENV=/home/.bashrc | ||
|
||
RUN apk update \ | ||
&& apk add --no-cache --virtual .build-deps \ | ||
build-base \ | ||
&& pip install --upgrade pip \ | ||
&& pip install virtualenv \ | ||
&& apk del \ | ||
.build-deps \ | ||
&& apk add --no-cache \ | ||
rsync \ | ||
tar \ | ||
&& rm -rf /var/cache/apk/* | ||
|
||
# Make sure shells are not running forever | ||
COPY 80-shell-timeout.sh /lagoon/entrypoints/ | ||
RUN echo "source /lagoon/entrypoints/80-shell-timeout.sh" >> /home/.bashrc | ||
|
||
ENTRYPOINT ["/sbin/tini", "--", "/lagoon/entrypoints.sh"] | ||
CMD ["python"] |