From b436146109c2b3af3e2821654d9e3c070372b80b Mon Sep 17 00:00:00 2001 From: Moul <moul@moul.re> Date: Wed, 25 Sep 2024 14:41:28 +0200 Subject: [PATCH 1/2] Switch to up-to-date Debian MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove `curl apt-transport-https ca-certificates` installation most likely used to install `docker-engine` from Docker apt repo remove `docker-compose` installation, I don’t see a usage --- Dockerfile | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/Dockerfile b/Dockerfile index 06daa7a..b378a4b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,5 @@ -FROM library/ubuntu:16.04 -MAINTAINER Florian Thöni <florian.thoni@floth.fr> +FROM debian:bookworm-slim -ENV DEBIAN_FRONTEND noninteractive - -RUN apt-get update; \ - apt-get install -y curl apt-transport-https ca-certificates; \ - apt-get update; \ - apt-get install -y docker docker-compose git; \ - apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* +RUN apt update && \ + apt install --yes docker git && \ + rm -rf /var/lib/apt/lists/* -- GitLab From 8950bfec2e307afe7652325992bd1deefd5211ee Mon Sep 17 00:00:00 2001 From: Moul <moul@moul.re> Date: Thu, 26 Sep 2024 16:21:27 +0200 Subject: [PATCH 2/2] ci: Tag image with `latest` tag and publish it --- .gitlab-ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ef532d2..870ea00 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -17,6 +17,8 @@ build_image: - docker login -u "gitlab-ci-token" -p "$CI_JOB_TOKEN" $CI_REGISTRY - docker build --pull -t "$CI_REGISTRY_IMAGE:$CI_COMMIT_TAG" . - docker push "$CI_REGISTRY_IMAGE:$CI_COMMIT_TAG" + - docker tag "$CI_REGISTRY_IMAGE:$CI_COMMIT_TAG" "$CI_REGISTRY_IMAGE:latest" + - docker push "$CI_REGISTRY_IMAGE:latest" only: - tags tags: -- GitLab