From 49a59c9b9bda831fabab0c86a996c793fbb58913 Mon Sep 17 00:00:00 2001 From: kx1t Date: Sun, 7 Apr 2024 22:29:49 +0200 Subject: [PATCH] bring Dockerfile to Modern Era --- Dockerfile | 30 ++++-------------------------- 1 file changed, 4 insertions(+), 26 deletions(-) diff --git a/Dockerfile b/Dockerfile index 196dedd..9c3f4a9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,35 +1,18 @@ -FROM debian:stable-slim - -ENV S6_BEHAVIOUR_IF_STAGE2_FAILS=2 +FROM ghcr.io/sdr-enthusiasts/docker-baseimage:base SHELL ["/bin/bash", "-o", "pipefail", "-c"] -# Copy needs to be here to prevent github actions from failing. -# SSL Certs are pre-loaded into the root_certs via a job in github action: -# See: "Copy CA Certificates from GitHub Runner to Image rootfs" in deploy.yml -COPY root_certs/ / - # Now install all the packages and perform basic config: RUN set -x && \ # define packages needed for installation and general management of the container: TEMP_PACKAGES=() && \ KEPT_PACKAGES=() && \ - # Required for building multiple packages. - TEMP_PACKAGES+=(git) && \ - TEMP_PACKAGES+=(wget) && \ # logging KEPT_PACKAGES+=(gawk) && \ KEPT_PACKAGES+=(pv) && \ - # required for S6 overlay - # curl kept for healthcheck - # ca-certificates kept for python - TEMP_PACKAGES+=(gnupg2) && \ - TEMP_PACKAGES+=(file) && \ - TEMP_PACKAGES+=(curl) && \ - KEPT_PACKAGES+=(ca-certificates) && \ # a few KEPT_PACKAGES for debugging - they can be removed in the future - KEPT_PACKAGES+=(procps nano aptitude netcat) && \ + KEPT_PACKAGES+=(procps nano) && \ # # define packages needed for noisecapt KEPT_PACKAGES+=(jq) && \ @@ -45,16 +28,11 @@ RUN set -x && \ ${KEPT_PACKAGES[@]} \ ${TEMP_PACKAGES[@]} \ && \ - git config --global advice.detachedHead false && \ # # Do some other stuff - echo "alias dir=\"ls -alsv\"" >> /root/.bashrc && \ -# -# install S6 Overlay - curl -s https://raw.githubusercontent.com/mikenye/deploy-s6-overlay/master/deploy-s6-overlay.sh | sh && \ -# + echo "alias dir=\"ls -alsvh\"" >> /root/.bashrc && \ # Clean up - apt-get remove -y ${TEMP_PACKAGES[@]} && \ + if (( ${#TEMP_PACKAGES[*]} > 0 )); then apt-get remove -y ${TEMP_PACKAGES[@]}; fi && \ apt-get autoremove -o APT::Autoremove::RecommendsImportant=0 -o APT::Autoremove::SuggestsImportant=0 -y && \ apt-get clean -y && \ rm -rf /tmp/* /var/lib/apt/lists/*