From ead4e2085536d4a870cfcce92255311fe3271d59 Mon Sep 17 00:00:00 2001 From: ale <ale@incal.net> Date: Thu, 22 Sep 2022 20:32:02 +0100 Subject: [PATCH] Simplify build --- Dockerfile | 7 ++++--- build.sh | 35 ----------------------------------- 2 files changed, 4 insertions(+), 38 deletions(-) delete mode 100755 build.sh diff --git a/Dockerfile b/Dockerfile index cf425f1..8fd61f2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,9 @@ FROM debian:stable-slim -COPY build.sh /tmp/build.sh - -RUN /tmp/build.sh && rm /tmp/build.sh +RUN apt-get -q update && \ + env DEBIAN_FRONTEND=noninteractive apt-get -y install prometheus && \ + apt-get clean && \ + rm -fr /var/lib/apt/lists/* ENTRYPOINT ["/usr/bin/prometheus"] diff --git a/build.sh b/build.sh deleted file mode 100755 index c21e504..0000000 --- a/build.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh -# -# Install script for chaperone inside a Docker container. -# - -# Packages required to serve the website and run the services. -PACKAGES="prometheus" - -# The default bitnami/minideb image defines an 'install_packages' -# command which is just a convenient helper. Define our own in -# case we are using some other Debian image. -if [ "x$(which install_packages)" = "x" ]; then - install_packages() { - env DEBIAN_FRONTEND=noninteractive apt-get install -qy -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" --no-install-recommends "$@" - } -fi - -die() { - echo "ERROR: $*" >&2 - exit 1 -} - -set -x - -apt-get -q update - -# Install required packages -install_packages ${PACKAGES} \ - || die "could not install packages" - -# Remove packages used for installation. -#apt-get remove -y --purge ${BUILD_PACKAGES} -apt-get autoremove -y -apt-get clean -rm -fr /var/lib/apt/lists/* -- GitLab