build(docker): Don't break when debian drops old packge versions
Some checks failed
Rust / build (push) Successful in 6m8s
ci/woodpecker/push/cron-docker-builder Pipeline was successful
Release Please / Release-plz (push) Failing after 1h0m59s
ci/woodpecker/push/push-next Pipeline was successful
ci/woodpecker/push/tag-created Pipeline was successful

Debian routinly drop older versions of packages from the repositories as
new versions replace them. Pinning the version causes the build to break
at seamingly random times when the pinned version gets dropped.
This commit is contained in:
Paul Campbell 2024-09-13 18:59:35 +01:00
parent 6c60e3fb7a
commit 3ea7f36c98
2 changed files with 11 additions and 6 deletions

View file

@ -15,14 +15,10 @@ COPY . .
RUN cargo build --release --bin git-next --all-features && \ RUN cargo build --release --bin git-next --all-features && \
strip target/release/git-next strip target/release/git-next
FROM docker.io/debian:stable-20240722-slim AS runtime FROM docker.io/debian:stable-20240904-slim AS runtime
WORKDIR /app WORKDIR /app
RUN apt-get update && \ RUN apt-get update && \
apt-get install --no-install-recommends -y \ apt-get satisfy -y "git (>=2.39), libssl3 (>=3.0.14), libdbus-1-dev (>=1.14.10), ca-certificates (>=20230311)" \
git=1:2.39.2-1.1 \
libssl3=3.0.14-1~deb12u1 \
libdbus-1-dev=1.14.10-1~deb12u1 \
ca-certificates=20230311 \
&& \ && \
rm -rf /var/lib/apt/lists/* rm -rf /var/lib/apt/lists/*
USER 1000 USER 1000

View file

@ -68,3 +68,12 @@ publish version:
done done
echo "All crates published" echo "All crates published"
git checkout dev git checkout dev
docker-build-builder:
docker build -t git.kemitix.net/kemitix/git-next-builder:2024.08.04 -f Dockerfile.builder .
docker-build: docker-build-builder
docker build -t git.kemitix.net/kemitix/git-next:latest .
docker-run: docker-build
docker run -it -p "7777:8888" -v .:/app/ git.kemitix.net/kemitix/git-next:latest server start --ui