From 3ea7f36c989da90ab61648ed44e593cb8706a439 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Fri, 13 Sep 2024 18:59:35 +0100 Subject: [PATCH] build(docker): Don't break when debian drops old packge versions 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. --- Dockerfile | 8 ++------ justfile | 9 +++++++++ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 82b50627..dfa8aa0b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,14 +15,10 @@ COPY . . RUN cargo build --release --bin git-next --all-features && \ 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 RUN apt-get update && \ - apt-get install --no-install-recommends -y \ - git=1:2.39.2-1.1 \ - libssl3=3.0.14-1~deb12u1 \ - libdbus-1-dev=1.14.10-1~deb12u1 \ - ca-certificates=20230311 \ + apt-get satisfy -y "git (>=2.39), libssl3 (>=3.0.14), libdbus-1-dev (>=1.14.10), ca-certificates (>=20230311)" \ && \ rm -rf /var/lib/apt/lists/* USER 1000 diff --git a/justfile b/justfile index 2199f581..dde9a245 100644 --- a/justfile +++ b/justfile @@ -68,3 +68,12 @@ publish version: done echo "All crates published" 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