Skip to content

Commit 7e04a89

Browse files
committed
chore: Refine devcontainer configuration by removing redundant remoteEnv and updating PATH in Dockerfile
1 parent 1fbbecb commit 7e04a89

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

.devcontainer/devcontainer.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,5 @@
8181
"source=${localEnv:HOME}/.ssh,target=/home/vscode/.ssh,type=bind,consistency=cached"
8282
],
8383
"name": "Devcontainer",
84-
"postCreateCommand": "scripts/devcontainer/postcreatecommand.sh",
85-
"remoteEnv": {
86-
"PATH": "/home/vscode/.asdf/shims:/go/bin:/home/vscode/go/bin:/home/vscode/.asdf/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/vscode/.vscode-server/data/User/globalStorage/github.copilot-chat/debugCommand:/home/vscode/.local/bin"
87-
}
84+
"postCreateCommand": "scripts/devcontainer/postcreatecommand.sh"
8885
}

scripts/devcontainer/Dockerfile

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ ENV REQUESTS_CA_BUNDLE="/etc/ssl/certs/ca-certificates.crt"
2828
ENV CURL_CA_BUNDLE="/etc/ssl/certs/ca-certificates.crt"
2929
ENV GIT_SSL_CAINFO="/etc/ssl/certs/ca-certificates.crt"
3030

31-
# Set Go environment variables
31+
# Set Go environment variables and prepend asdf shims/bin to PATH
3232
ENV GOPATH="/home/vscode/go"
33-
ENV PATH="/go/bin:${GOPATH}/bin:${PATH}"
33+
ENV PATH="/home/vscode/.asdf/shims:/home/vscode/.asdf/bin:/go/bin:${GOPATH}/bin:${PATH}"
3434

3535
# Ensure CA Certs is available for all shells, Node, Python & Ruby
3636
USER vscode
@@ -40,6 +40,3 @@ RUN echo 'SSL_CERT_FILE="/etc/ssl/certs/ca-certificates.crt"' >> ~/.zshrc
4040
RUN echo 'REQUESTS_CA_BUNDLE="/etc/ssl/certs/ca-certificates.crt"' >> ~/.zshrc
4141
RUN echo 'CURL_CA_BUNDLE="/etc/ssl/certs/ca-certificates.crt"' >> ~/.zshrc
4242
RUN echo 'GIT_SSL_CAINFO="/etc/ssl/certs/ca-certificates.crt"' >> ~/.zshrc
43-
44-
# Add Go environment to shell
45-
RUN echo 'GOPATH="/home/vscode/go"' >> ~/.zshrc

0 commit comments

Comments
 (0)