Skip to content

Commit

Permalink
bring Dockerfile to Modern Era
Browse files Browse the repository at this point in the history
  • Loading branch information
kx1t committed Apr 7, 2024
1 parent f0059dc commit 49a59c9
Showing 1 changed file with 4 additions and 26 deletions.
30 changes: 4 additions & 26 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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) && \
Expand All @@ -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/*
Expand Down

0 comments on commit 49a59c9

Please sign in to comment.