From acc0fba604c33db5c56aca42d4b98133eba905a4 Mon Sep 17 00:00:00 2001 From: Daniel Ceregatti Date: Fri, 21 Jun 2024 19:12:46 -0700 Subject: [PATCH] Simplify Dockerfile even more. Fix PS1. --- Dockerfile | 9 +-------- start.sh | 12 +++++++++--- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/Dockerfile b/Dockerfile index 28d48e3..9c0c31c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,18 +3,11 @@ FROM debian:bookworm-slim # Set debconf to run non-interactively RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections -# Install _only_ the necessary packages +# Install only the necessary packages RUN apt-get update && apt-get -y upgrade && apt-get -y install --no-install-recommends \ - locales \ nano \ procps -# Set the locale -#RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && locale-gen -#ENV LANG en_US.UTF-8 -#ENV LANGUAGE en_US:en -#ENV LC_ALL en_US.UTF-8 - # Setup a non-privileged user ARG USER_ID diff --git a/start.sh b/start.sh index 3b372ce..a939cac 100755 --- a/start.sh +++ b/start.sh @@ -1,10 +1,16 @@ #!/usr/bin/env bash -# Set PS1 so we know we're in the container, should we exec into it. +trap ' + echo "Caught signal, shutting down." + exit 0 +' SIGTERM SIGINT + +# Set PS1 so we know we're in the container cat > .bashrc <