Update devcontainer configuration and Dockerfile to improve environment setup

This commit is contained in:
Andy Oknen 2025-07-29 21:21:47 +00:00
parent a7185743cc
commit 4acc41cc03
3 changed files with 6 additions and 1 deletions

View file

@ -44,7 +44,7 @@
"GOMODCACHE": "/home/vscode/.cache/go-mod" "GOMODCACHE": "/home/vscode/.cache/go-mod"
}, },
// Post create command to set up the environment // Post create command to set up the environment
"postCreateCommand": "mkdir -p /home/vscode/.cache/go-build /home/vscode/.cache/go-mod && cd /workspace && go mod download && go mod tidy", "postCreateCommand": "mkdir -p /home/vscode/.cache/go-build /home/vscode/.cache/go-mod && cd /workspaces/yggdrasil-go && go mod download && go mod tidy",
// Keep the container running // Keep the container running
"overrideCommand": false, "overrideCommand": false,
// Use non-root user // Use non-root user

1
.gitignore vendored
View file

@ -2,5 +2,6 @@
/yggdrasil /yggdrasil
/yggdrasilctl /yggdrasilctl
/yggdrasil.conf /yggdrasil.conf
/yggdrasil.json
/run /run
/test /test

View file

@ -7,6 +7,7 @@ RUN apt-get update && apt-get install -y \
ca-certificates \ ca-certificates \
sudo \ sudo \
zsh \ zsh \
locales \
&& apt-get clean \ && apt-get clean \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*
@ -51,6 +52,9 @@ USER $USERNAME
ENV SHELL=/bin/zsh ENV SHELL=/bin/zsh
RUN echo 'export PATH=$PATH:$(go env GOPATH)/bin' >> ~/.zshrc \ RUN echo 'export PATH=$PATH:$(go env GOPATH)/bin' >> ~/.zshrc \
&& echo 'export GO111MODULE=on' >> ~/.zshrc \ && echo 'export GO111MODULE=on' >> ~/.zshrc \
&& echo 'export LANG=C.UTF-8' >> ~/.zshrc \
&& echo 'export LC_ALL=C.UTF-8' >> ~/.zshrc \
&& echo 'export LC_CTYPE=C.UTF-8' >> ~/.zshrc \
&& mkdir -p ~/.cache && mkdir -p ~/.cache
# Expose common ports that might be used by Yggdrasil # Expose common ports that might be used by Yggdrasil