Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 6 additions & 26 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"build": {
"dockerfile": "../scripts/devcontainer/Dockerfile"
},
"customizations": {
"codespaces": {
"openFiles": [
Expand All @@ -9,11 +12,7 @@
},
"vscode": {
"extensions": [
"ms-dotnettools.csdevkit",
"42crunch.vscode-openapi",
"alefragnani.bookmarks",
"AmazonWebServices.aws-toolkit-vscode",
"chdsbd.github-code-owners",
"davidanson.vscode-markdownlint",
"dbaeumer.vscode-eslint",
"donjayamanne.githistory",
Expand All @@ -26,7 +25,6 @@
"github.vscode-github-actions",
"github.vscode-pull-request-github",
"hediet.vscode-drawio",
"johnpapa.vscode-peacock",
"joshx.workspace-terminals",
"maattdd.gitless",
"mhutchie.git-graph",
Expand All @@ -40,15 +38,10 @@
"streetsidesoftware.code-spell-checker-british-english",
"takumii.markdowntable",
"tamasfe.even-better-toml",
"tomoki1207.pdf",
"vscjava.vscode-java-pack",
"vscode-icons-team.vscode-icons",
"vstirbu.vscode-mermaid-preview",
"wayou.vscode-todo-highlight",
"yzane.markdown-pdf",
"yzhang.dictionary-completion",
"yzhang.markdown-all-in-one",
"zoma.vscode-auto-open-workspace"
"yzhang.markdown-all-in-one"
],
"settings": {
"[makefile]": {
Expand Down Expand Up @@ -77,30 +70,17 @@
"installZsh": true
},
"ghcr.io/devcontainers/features/docker-in-docker:2": {
"azureDnsAutoDetection": true,
"dockerDashComposeVersion": "v2",
"installDockerBuildx": true,
"installDockerComposeSwitch": true,
"moby": true,
"version": "latest"
},
"ghcr.io/devcontainers/features/dotnet:2": {
"aspNetCoreRuntimeVersions": "8.0",
"dotnetRuntimeVersions": "8.0",
"version": "8.0"
},
"ghcr.io/devcontainers/features/go:1": {},
"ghcr.io/devcontainers/features/java:1": {
"version": "17"
},
"ghcr.io/devcontainers/features/node:1": {},
"ghcr.io/devcontainers/features/python:1": {},
"ghcr.io/devcontainers/features/ruby:1": {}
},
"image": "mcr.microsoft.com/devcontainers/base:noble",
"mounts": [
"source=${localEnv:HOME}/.gnupg,target=/home/vscode/.gnupg,type=bind,consistency=cached"
"source=${localEnv:HOME}/.ssh,target=/home/vscode/.ssh,type=bind,consistency=cached"
],
"name": "Ubuntu",
"name": "Devcontainer",
"postCreateCommand": "scripts/devcontainer/postcreatecommand.sh"
}
134 changes: 0 additions & 134 deletions project.code-workspace

This file was deleted.

18 changes: 18 additions & 0 deletions scripts/devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# syntax=docker/dockerfile:1
FROM mcr.microsoft.com/devcontainers/base:ubuntu

# Copy CA certs and Dynamically set NODE_EXTRA_CA_CERTS accordingly
RUN apt-get update && apt-get install -y ca-certificates
COPY custom-ca-certs/. /usr/local/share/ca-certificates/
RUN update-ca-certificates

# Concatenate all certs for use in EnvVars
RUN find /usr/local/share/ca-certificates -type f \( -name '*.pem' -o -name '*.crt' \) -exec cat {} + > "/usr/local/share/ca-certificates/combined-cacerts.pem"

# Ensure CA Certs is available for all shells, Node, Python & Ruby
USER vscode
RUN echo 'NODE_EXTRA_CA_CERTS="/usr/local/share/ca-certificates/combined-cacerts.pem"' >> ~/.zshrc
RUN echo 'SSL_CERT_FILE="/usr/local/share/ca-certificates/combined-cacerts.pem"' >> ~/.zshrc
RUN echo 'REQUESTS_CA_BUNDLE="/usr/local/share/ca-certificates/combined-cacerts.pem"' >> ~/.zshrc
RUN echo 'CURL_CA_BUNDLE="/usr/local/share/ca-certificates/combined-cacerts.pem"' >> ~/.zshrc
RUN echo 'GIT_SSL_CAINFO="/usr/local/share/ca-certificates/combined-cacerts.pem"' >> ~/.zshrc
2 changes: 2 additions & 0 deletions scripts/devcontainer/custom-ca-certs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*
!.gitignore
3 changes: 0 additions & 3 deletions scripts/devcontainer/postcreatecommand.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
#!/bin/bash

pipx install pre-commit

rm -Rf ~/.asdf
git clone https://github.com/asdf-vm/asdf.git ~/.asdf;
chmod +x ~/.asdf/asdf.sh;
echo '. $HOME/.asdf/asdf.sh' >> ~/.zshrc
echo '. $HOME/.asdf/completions/asdf.bash' >> ~/.zshrc

echo 'export GPG_TTY=$TTY' | cat - ~/.zshrc > temp && mv temp ~/.zshrc

Expand Down
Loading