Add a Debian Bookworm (12)

This commit is contained in:
Benjamin Renard 2023-07-19 18:23:08 +02:00
parent 8a7173cb29
commit 0e03184115
Signed by: bn8
GPG key ID: 3E2E1CE1907115BC
5 changed files with 41 additions and 4 deletions

View file

@ -1,4 +0,0 @@
FROM debian:latest
RUN apt-get update && apt-get install --no-install-recommends -y python3-all python3-dev python3-pip python3-venv python3-apt apt-file dpkg-dev fakeroot build-essential devscripts debhelper dh-python python3-wheel sed lsb-release gnupg2 curl jq git python3-git rsync && apt-get clean && rm -rf /var/lib/apt/lists/* && apt-file update
RUN python3 -m pip install wheel2deb pylint pytest flake8 flake8-junit-report pylint-junit junitparser
RUN git clone https://gitea.zionetrix.net/bn8/gitdch.git /usr/local/src/gitdch && ln -s /usr/local/src/gitdch/gitdch /usr/local/bin/gitdch

5
Dockerfile.common Normal file
View file

@ -0,0 +1,5 @@
ENV APT_PACKAGES="python3-all python3-dev python3-pip python3-venv python3-apt apt-file dpkg-dev fakeroot build-essential devscripts debhelper dh-python python3-wheel sed lsb-release gnupg2 curl jq git python3-git rsync"
ENV PIP_PACKAGES="wheel2deb pylint pytest flake8 flake8-junit-report pylint-junit junitparser"
RUN apt-get update && apt-get install --no-install-recommends -y $APT_PACKAGES && apt-get clean && rm -rf /var/lib/apt/lists/* && apt-file update
RUN git clone https://gitea.zionetrix.net/bn8/gitdch.git /usr/local/src/gitdch && ln -s /usr/local/src/gitdch/gitdch /usr/local/bin/gitdch

7
Dockerfile.debian11 Normal file
View file

@ -0,0 +1,7 @@
# syntax = edrevo/dockerfile-plus
FROM debian:11
INCLUDE+ Dockerfile.common
RUN python3 -m pip install $PIP_PACKAGES

7
Dockerfile.debian12 Normal file
View file

@ -0,0 +1,7 @@
# syntax = edrevo/dockerfile-plus
FROM debian:12
INCLUDE+ Dockerfile.common
RUN python3 -m pip install --break-system-packages $PIP_PACKAGES

View file

@ -13,3 +13,25 @@ To use it:
```bash
docker run -it -v "$(pwd)":/src -w /src brenard/debian-python-deb
```
## Build
```bash
# Need to use Dockerfile+ (https://github.com/edrevo/dockerfile-plus)
export DOCKER_BUILDKIT=1
export COMPOSE_DOCKER_CLI_BUILD=1
for deb_version in 11 12
do
docker build -t brenard/debian-python-deb:debian${deb_version} -f Dockerfile.debian${deb_version} .
done
```
## Publish
```bash
for deb_version in 11 12
do
docker push brenard/debian-python-deb:debian${deb_version}
done
```