Skip to content
This repository has been archived by the owner on Dec 12, 2024. It is now read-only.

Commit

Permalink
add direnv and accelerate startup time in github codespaces (#33)
Browse files Browse the repository at this point in the history
* add direnv to the container image to support setting environment variables in code

* remove non-critical commands

* add direnv to the container image to support setting environment variables in code

* add dependencies for faster codespaces startup
  • Loading branch information
usrbinkat authored Jan 11, 2024
1 parent c52aa43 commit cb7abb8
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,29 @@ USER vscode
ARG APT_PKGS="\
gh \
git \
vim \
curl \
tmux \
gnupg \
socat \
libwrap0 \
gnupg-agent \
#docker-ce-cli \
manpages-posix \
build-essential \
ca-certificates \
tmux \
vim \
manpages-posix-dev \
apt-transport-https \
#docker-buildx-plugin \
software-properties-common \
"
RUN set -ex \
&& sudo apt-get update \
&& sudo apt-get install ${APT_PKGS} \
&& sudo apt-get clean \
&& sudo apt-get autoremove -y \
&& curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - \
&& sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable" \
&& sudo apt-get purge -y --auto-remove \
&& sudo rm -rf \
/var/lib/{apt,dpkg,cache,log} \
Expand Down Expand Up @@ -125,7 +136,7 @@ RUN set -ex \

# Install direnv
RUN set -ex \
&& echo 'eval "\$(direnv hook $SHELL)"' | sudo tee -a /etc/skel/.bashrc | tee -a ${HOME}/.bashrc \
&& 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" \
Expand Down

0 comments on commit cb7abb8

Please sign in to comment.