2022-04-30 14:25:18 +02:00
|
|
|
# Docker image to build Debian package of Python apps/libraries
|
|
|
|
|
|
|
|
Image with common dependencies to build Debian package of Python apps/libraries :
|
|
|
|
|
2024-02-29 12:52:25 +01:00
|
|
|
- common Debian python packages: `python3-all python3-dev python3-pip python3-venv python3-apt python3-appdirs python3-wheel python3-git`
|
|
|
|
- common PIP installed python packages: `stdeb poetry2setup wheel2deb pylint pytest flake8 flake8-junit-report pylint-junit junitparser pylint-gitlab flake8-codeclimate`
|
|
|
|
- common Debian packages building tools: `apt-file dpkg-dev fakeroot build-essential devscripts debhelper dh-python equivs`
|
|
|
|
- common tools: `sed lsb-release gnupg2 curl jq git rsync wget ca-certificates`
|
2022-11-07 20:21:22 +01:00
|
|
|
- [gitdch](https://gitea.zionetrix.net/bn8/gitdch) tool
|
2022-04-30 14:25:18 +02:00
|
|
|
|
|
|
|
To use it:
|
|
|
|
|
|
|
|
```bash
|
2023-08-08 14:48:23 +02:00
|
|
|
docker run -it -v "$(pwd)":/src -w /src docker.io/brenard/debian-python-deb
|
2022-04-30 14:25:18 +02:00
|
|
|
```
|
2023-07-19 18:23:08 +02:00
|
|
|
|
|
|
|
## Build
|
|
|
|
|
|
|
|
```bash
|
|
|
|
# Need to use Dockerfile+ (https://github.com/edrevo/dockerfile-plus)
|
|
|
|
export DOCKER_BUILDKIT=1
|
|
|
|
export COMPOSE_DOCKER_CLI_BUILD=1
|
|
|
|
|
2023-08-08 14:35:56 +02:00
|
|
|
for deb_version in 10 11 12
|
2023-07-19 18:23:08 +02:00
|
|
|
do
|
2023-08-08 14:48:23 +02:00
|
|
|
docker build -t docker.io/brenard/debian-python-deb:debian${deb_version} -f Dockerfile.debian${deb_version} .
|
2023-07-19 18:23:08 +02:00
|
|
|
done
|
2023-08-08 14:48:23 +02:00
|
|
|
docker build -t docker.io/brenard/debian-python-deb:latest -f Dockerfile.debian${deb_version} .
|
2023-07-19 18:23:08 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
## Publish
|
|
|
|
|
|
|
|
```bash
|
2023-08-08 14:35:56 +02:00
|
|
|
for deb_version in 10 11 12
|
2023-07-19 18:23:08 +02:00
|
|
|
do
|
2023-08-08 14:48:23 +02:00
|
|
|
docker push docker.io/brenard/debian-python-deb:debian${deb_version}
|
2023-07-19 18:23:08 +02:00
|
|
|
done
|
2023-08-08 14:48:23 +02:00
|
|
|
docker push docker.io/brenard/debian-python-deb:latest
|
2023-07-19 18:23:08 +02:00
|
|
|
```
|