From c52aa43fa4e8a825b176097e60d7aee5e4e73526 Mon Sep 17 00:00:00 2001 From: Kat Morgan Date: Wed, 10 Jan 2024 19:43:25 -0800 Subject: [PATCH] =?UTF-8?q?add=20direnv=20to=20the=20container=20image=20t?= =?UTF-8?q?o=20support=20setting=20environment=20vari=E2=80=A6=20(#32)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * add direnv to the container image to support setting environment variables in code * remove non-critical commands --- Dockerfile | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Dockerfile b/Dockerfile index 4a5185b..59fda28 100644 --- a/Dockerfile +++ b/Dockerfile @@ -123,6 +123,16 @@ RUN set -ex \ && rm -rf /tmp/* \ && true +# Install direnv +RUN set -ex \ + && echo 'eval "\$(direnv hook $SHELL)"' | sudo tee -a /etc/skel/.bashrc | tee -a ${HOME}/.bashrc \ + && curl --output /tmp/install.sh --proto '=https' --tlsv1.2 -Sf -L "https://direnv.net/install.sh" \ + && chmod +x /tmp/install.sh \ + && sudo bash -c "/tmp/install.sh" \ + && direnv --version \ + && sudo rm -rf /tmp/* \ + && true + # Install golang # TODO: relocate install to devbox ARG GO_PKGS="\