docker-debian-python-deb/README.md
2023-08-08 14:47:31 +02:00

38 lines
1.1 KiB
Markdown

# Docker image to build Debian package of Python apps/libraries
Image with common dependencies to build Debian package of Python apps/libraries :
- common python packages: `python3-all python3-dev python3-pip python3-venv python3-apt python3-appdirs python3-wheel python3-git`
- common Debian packages building tools: `apt-file dpkg-dev fakeroot build-essential devscripts debhelper dh-python`
- common tools: `sed lsb-release gnupg2 curl jq git rsync`
- [gitdch](https://gitea.zionetrix.net/bn8/gitdch) tool
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 10 11 12
do
docker build -t brenard/debian-python-deb:debian${deb_version} -f Dockerfile.debian${deb_version} .
done
docker build -t brenard/debian-python-deb:latest -f Dockerfile.debian${deb_version} .
```
## Publish
```bash
for deb_version in 10 11 12
do
docker push brenard/debian-python-deb:debian${deb_version}
done
docker push brenard/debian-python-deb:latest
```