Build rtorrent Docker image on Debian 12 slim

- Create multi-stage Dockerfile for libtorrent/rtorrent compilation
- Set up runtime image with binaries, config, and entrypoint script
- Implement Makefile and docker-compose for build/cleanup processes
- Entrypoint script for user creation and config setup
This commit is contained in:
2024-09-10 00:44:12 -04:00
commit e9399f4344
4 changed files with 127 additions and 0 deletions

20
Makefile Normal file
View File

@@ -0,0 +1,20 @@
DOCKER_BUILDKIT ?= 1
BUILDKIT_PROGRESS ?= auto
DOCKER_COMPOSE_OPTS = BUILDX_GIT_LABELS=full \
DOCKER_BUILDKIT=$(DOCKER_BUILDKIT) \
BUILDKIT_PROGRESS=$(BUILDKIT_PROGRESS)
DOCKER_COMPOSE_BUILD = $(DOCKER_COMPOSE_OPTS) docker compose -f docker-compose.build.yml build
PRUNE_IMAGES = \
localhost/rtorrent:latest
.PHONY: default
default:
$(DOCKER_COMPOSE_BUILD) rtorrent
clean:
docker image rm $(PRUNE_IMAGES) || true
docker builder prune -f