From 9dcc111bcf50d60ed5ea9eeef6db45f6408b42dc Mon Sep 17 00:00:00 2001 From: Trenton H <797416+stumpylog@users.noreply.github.com> Date: Tue, 8 Apr 2025 12:49:31 -0700 Subject: [PATCH] Play around with letting interactive Bash shells also access the container environment --- Dockerfile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Dockerfile b/Dockerfile index 4a49a9ff2..c0cf1f082 100644 --- a/Dockerfile +++ b/Dockerfile @@ -75,6 +75,12 @@ RUN set -eux \ && echo "Removing downloaded archives" \ && rm ./*.tar.xz \ && rm ./*.sha256 \ + && echo "Configuring Bash to see container environment" \ + && echo '#!/bin/sh' > /tmp/bash-wrapper \ + && echo 'exec /command/with-contenv /bin/bash.original "$@"' >> /tmp/bash-wrapper \ + && chmod +x /tmp/bash-wrapper \ + && cp /bin/bash /bin/bash.original \ + && mv /tmp/bash-wrapper /bin/bash \ && echo "Cleaning up image" \ && apt-get --yes purge ${S6_BUILD_TIME_PKGS} \ && apt-get --yes autoremove --purge \