Skip to content

Commit

Permalink
updated all python versions and added 3.12 and 3.13
Browse files Browse the repository at this point in the history
  • Loading branch information
gOOvER committed Nov 16, 2024
1 parent 2b5238a commit 08e67d9
Show file tree
Hide file tree
Showing 9 changed files with 151 additions and 63 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/dev-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,22 +28,24 @@ jobs:
- '3.9'
- '3.10'
- '3.11'

- '3.12'
- '3.13'

steps:
- uses: actions/checkout@v4

- uses: docker/setup-qemu-action@v3

- uses: docker/setup-buildx-action@v3
with:
buildkitd-flags: --debug

- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- uses: docker/build-push-action@v6
with:
context: ./dev/python
Expand Down
19 changes: 10 additions & 9 deletions dev/python/2.7/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
FROM --platform=$TARGETOS/$TARGETARCH python:2.7-slim
FROM --platform=$TARGETOS/$TARGETARCH python:2.7-slim

LABEL author="Michael Parker" maintainer="[email protected]"
LABEL author="Torsten Widmann" maintainer="[email protected]"
LABEL org.opencontainers.image.source="https://github.com/gOOvER/own-pterodactyl-images"
LABEL org.opencontainers.image.licenses=MIT
Expand All @@ -22,20 +23,20 @@ RUN apt -y install \
locales \
procps

RUN python -m pip install --upgrade pip
RUN python -m pip install --upgrade pip

# Set the locale
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && \
locale-gen
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && \
locale-gen
ENV LANG en_US.UTF-8

Check warning on line 31 in dev/python/2.7/Dockerfile

View workflow job for this annotation

GitHub Actions / python:2.7

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/
ENV LANGUAGE en_US:en

Check warning on line 32 in dev/python/2.7/Dockerfile

View workflow job for this annotation

GitHub Actions / python:2.7

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/
ENV LC_ALL en_US.UTF-8

Check warning on line 33 in dev/python/2.7/Dockerfile

View workflow job for this annotation

GitHub Actions / python:2.7

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

## Setup user and working directory
RUN useradd -m -d /home/container -s /bin/bash container
USER container
ENV USER=container HOME=/home/container
WORKDIR /home/container

COPY ./../entrypoint.sh /entrypoint.sh
CMD ["/bin/bash", "/entrypoint.sh"]
COPY ./../entrypoint.sh /entrypoint.sh
CMD ["/bin/bash", "/entrypoint.sh"]
19 changes: 10 additions & 9 deletions dev/python/3.10/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
FROM --platform=$TARGETOS/$TARGETARCH python:3.10-slim
FROM --platform=$TARGETOS/$TARGETARCH python:3.10-slim

LABEL author="Michael Parker" maintainer="[email protected]"
LABEL author="Torsten Widmann" maintainer="[email protected]"
LABEL org.opencontainers.image.source="https://github.com/gOOvER/own-pterodactyl-images"
LABEL org.opencontainers.image.licenses=MIT
Expand All @@ -22,20 +23,20 @@ RUN apt -y install \
locales \
procps

RUN python -m pip install --upgrade pip
RUN python -m pip install --upgrade pip

# Set the locale
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && \
locale-gen
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && \
locale-gen
ENV LANG en_US.UTF-8

Check warning on line 31 in dev/python/3.10/Dockerfile

View workflow job for this annotation

GitHub Actions / python:3.10

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/
ENV LANGUAGE en_US:en

Check warning on line 32 in dev/python/3.10/Dockerfile

View workflow job for this annotation

GitHub Actions / python:3.10

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/
ENV LC_ALL en_US.UTF-8

Check warning on line 33 in dev/python/3.10/Dockerfile

View workflow job for this annotation

GitHub Actions / python:3.10

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

## Setup user and working directory
RUN useradd -m -d /home/container -s /bin/bash container
USER container
ENV USER=container HOME=/home/container
WORKDIR /home/container

COPY ./../entrypoint.sh /entrypoint.sh
CMD ["/bin/bash", "/entrypoint.sh"]
COPY ./../entrypoint.sh /entrypoint.sh
CMD ["/bin/bash", "/entrypoint.sh"]
21 changes: 10 additions & 11 deletions dev/python/3.11/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
FROM --platform=$TARGETOS/$TARGETARCH python:3.11-slim

LABEL author="Michael Parker" maintainer="[email protected]"
FROM --platform=$TARGETOS/$TARGETARCH python:3.11-slim

LABEL author="Michael Parker" maintainer="[email protected]"
LABEL author="Torsten Widmann" maintainer="[email protected]"
LABEL org.opencontainers.image.source="https://github.com/gOOvER/own-pterodactyl-images"
LABEL org.opencontainers.image.licenses=MIT
Expand All @@ -24,20 +23,20 @@ RUN apt -y install \
locales \
procps

RUN python -m pip install --upgrade pip
RUN python -m pip install --upgrade pip

# Set the locale
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && \
locale-gen
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && \
locale-gen
ENV LANG en_US.UTF-8

Check warning on line 31 in dev/python/3.11/Dockerfile

View workflow job for this annotation

GitHub Actions / python:3.11

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/
ENV LANGUAGE en_US:en

Check warning on line 32 in dev/python/3.11/Dockerfile

View workflow job for this annotation

GitHub Actions / python:3.11

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/
ENV LC_ALL en_US.UTF-8

Check warning on line 33 in dev/python/3.11/Dockerfile

View workflow job for this annotation

GitHub Actions / python:3.11

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

## Setup user and working directory
RUN useradd -m -d /home/container -s /bin/bash container
USER container
ENV USER=container HOME=/home/container
WORKDIR /home/container

COPY ./../entrypoint.sh /entrypoint.sh
CMD ["/bin/bash", "/entrypoint.sh"]
COPY ./../entrypoint.sh /entrypoint.sh
CMD ["/bin/bash", "/entrypoint.sh"]
42 changes: 42 additions & 0 deletions dev/python/3.12/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
FROM --platform=$TARGETOS/$TARGETARCH python:3.12-slim

LABEL author="Michael Parker" maintainer="[email protected]"
LABEL author="Torsten Widmann" maintainer="[email protected]"
LABEL org.opencontainers.image.source="https://github.com/gOOvER/own-pterodactyl-images"
LABEL org.opencontainers.image.licenses=MIT

ENV DEBIAN_FRONTEND=noninteractive

RUN apt update \
&& apt -y upgrade

RUN apt -y install \
ca-certificates \
curl \
default-libmysqlclient-dev \
dnsutils \
ffmpeg \
g++ \
gcc \
git \
iproute2 \
locales \
procps

RUN python -m pip install --upgrade pip

# Set the locale
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && \
locale-gen
ENV LANG en_US.UTF-8

Check warning on line 31 in dev/python/3.12/Dockerfile

View workflow job for this annotation

GitHub Actions / python:3.12

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/
ENV LANGUAGE en_US:en

Check warning on line 32 in dev/python/3.12/Dockerfile

View workflow job for this annotation

GitHub Actions / python:3.12

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/
ENV LC_ALL en_US.UTF-8

Check warning on line 33 in dev/python/3.12/Dockerfile

View workflow job for this annotation

GitHub Actions / python:3.12

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

## Setup user and working directory
RUN useradd -m -d /home/container -s /bin/bash container
USER container
ENV USER=container HOME=/home/container
WORKDIR /home/container

COPY ./../entrypoint.sh /entrypoint.sh
CMD ["/bin/bash", "/entrypoint.sh"]
42 changes: 42 additions & 0 deletions dev/python/3.13/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
FROM --platform=$TARGETOS/$TARGETARCH python:3.13-slim

LABEL author="Michael Parker" maintainer="[email protected]"
LABEL author="Torsten Widmann" maintainer="[email protected]"
LABEL org.opencontainers.image.source="https://github.com/gOOvER/own-pterodactyl-images"
LABEL org.opencontainers.image.licenses=MIT

ENV DEBIAN_FRONTEND=noninteractive

RUN apt update \
&& apt -y upgrade

RUN apt -y install \
ca-certificates \
curl \
default-libmysqlclient-dev \
dnsutils \
ffmpeg \
g++ \
gcc \
git \
iproute2 \
locales \
procps

RUN python -m pip install --upgrade pip

# Set the locale
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && \
locale-gen
ENV LANG en_US.UTF-8

Check warning on line 31 in dev/python/3.13/Dockerfile

View workflow job for this annotation

GitHub Actions / python:3.13

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/
ENV LANGUAGE en_US:en

Check warning on line 32 in dev/python/3.13/Dockerfile

View workflow job for this annotation

GitHub Actions / python:3.13

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/
ENV LC_ALL en_US.UTF-8

Check warning on line 33 in dev/python/3.13/Dockerfile

View workflow job for this annotation

GitHub Actions / python:3.13

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

## Setup user and working directory
RUN useradd -m -d /home/container -s /bin/bash container
USER container
ENV USER=container HOME=/home/container
WORKDIR /home/container

COPY ./../entrypoint.sh /entrypoint.sh
CMD ["/bin/bash", "/entrypoint.sh"]
19 changes: 10 additions & 9 deletions dev/python/3.7/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
FROM --platform=$TARGETOS/$TARGETARCH python:3.7-slim
FROM --platform=$TARGETOS/$TARGETARCH python:3.7-slim

LABEL author="Michael Parker" maintainer="[email protected]"
LABEL author="Torsten Widmann" maintainer="[email protected]"
LABEL org.opencontainers.image.source="https://github.com/gOOvER/own-pterodactyl-images"
LABEL org.opencontainers.image.licenses=MIT
Expand All @@ -22,20 +23,20 @@ RUN apt -y install \
locales \
procps

RUN python -m pip install --upgrade pip
RUN python -m pip install --upgrade pip

# Set the locale
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && \
locale-gen
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && \
locale-gen
ENV LANG en_US.UTF-8

Check warning on line 31 in dev/python/3.7/Dockerfile

View workflow job for this annotation

GitHub Actions / python:3.7

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/
ENV LANGUAGE en_US:en

Check warning on line 32 in dev/python/3.7/Dockerfile

View workflow job for this annotation

GitHub Actions / python:3.7

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/
ENV LC_ALL en_US.UTF-8

Check warning on line 33 in dev/python/3.7/Dockerfile

View workflow job for this annotation

GitHub Actions / python:3.7

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

## Setup user and working directory
RUN useradd -m -d /home/container -s /bin/bash container
USER container
ENV USER=container HOME=/home/container
WORKDIR /home/container

COPY ./../entrypoint.sh /entrypoint.sh
CMD ["/bin/bash", "/entrypoint.sh"]
COPY ./../entrypoint.sh /entrypoint.sh
CMD ["/bin/bash", "/entrypoint.sh"]
19 changes: 10 additions & 9 deletions dev/python/3.8/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
FROM --platform=$TARGETOS/$TARGETARCH python:3.8-slim
FROM --platform=$TARGETOS/$TARGETARCH python:3.8-slim

LABEL author="Michael Parker" maintainer="[email protected]"
LABEL author="Torsten Widmann" maintainer="[email protected]"
LABEL org.opencontainers.image.source="https://github.com/gOOvER/own-pterodactyl-images"
LABEL org.opencontainers.image.licenses=MIT
Expand All @@ -22,20 +23,20 @@ RUN apt -y install \
locales \
procps

RUN python -m pip install --upgrade pip
RUN python -m pip install --upgrade pip

# Set the locale
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && \
locale-gen
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && \
locale-gen
ENV LANG en_US.UTF-8

Check warning on line 31 in dev/python/3.8/Dockerfile

View workflow job for this annotation

GitHub Actions / python:3.8

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/
ENV LANGUAGE en_US:en

Check warning on line 32 in dev/python/3.8/Dockerfile

View workflow job for this annotation

GitHub Actions / python:3.8

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/
ENV LC_ALL en_US.UTF-8

Check warning on line 33 in dev/python/3.8/Dockerfile

View workflow job for this annotation

GitHub Actions / python:3.8

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

## Setup user and working directory
RUN useradd -m -d /home/container -s /bin/bash container
USER container
ENV USER=container HOME=/home/container
WORKDIR /home/container

COPY ./../entrypoint.sh /entrypoint.sh
CMD ["/bin/bash", "/entrypoint.sh"]
COPY ./../entrypoint.sh /entrypoint.sh
CMD ["/bin/bash", "/entrypoint.sh"]
21 changes: 10 additions & 11 deletions dev/python/3.9/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
FROM --platform=$TARGETOS/$TARGETARCH python:3.9-slim

LABEL author="Michael Parker" maintainer="[email protected]"
FROM --platform=$TARGETOS/$TARGETARCH python:3.9-slim

LABEL author="Michael Parker" maintainer="[email protected]"
LABEL author="Torsten Widmann" maintainer="[email protected]"
LABEL org.opencontainers.image.source="https://github.com/gOOvER/own-pterodactyl-images"
LABEL org.opencontainers.image.licenses=MIT
Expand All @@ -24,20 +23,20 @@ RUN apt -y install \
locales \
procps

RUN python -m pip install --upgrade pip
RUN python -m pip install --upgrade pip

# Set the locale
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && \
locale-gen
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && \
locale-gen
ENV LANG en_US.UTF-8

Check warning on line 31 in dev/python/3.9/Dockerfile

View workflow job for this annotation

GitHub Actions / python:3.9

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/
ENV LANGUAGE en_US:en

Check warning on line 32 in dev/python/3.9/Dockerfile

View workflow job for this annotation

GitHub Actions / python:3.9

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/
ENV LC_ALL en_US.UTF-8

Check warning on line 33 in dev/python/3.9/Dockerfile

View workflow job for this annotation

GitHub Actions / python:3.9

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

## Setup user and working directory
RUN useradd -m -d /home/container -s /bin/bash container
USER container
ENV USER=container HOME=/home/container
WORKDIR /home/container

COPY ./../entrypoint.sh /entrypoint.sh
CMD ["/bin/bash", "/entrypoint.sh"]
COPY ./../entrypoint.sh /entrypoint.sh
CMD ["/bin/bash", "/entrypoint.sh"]

0 comments on commit 08e67d9

Please sign in to comment.