Skip to content
Closed
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
6 changes: 6 additions & 0 deletions src/swift/.devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
ARG SWIFT_VERSION
FROM swift:${SWIFT_VERSION}

RUN if id "ubuntu" &>/dev/null; then \
echo "Deleting user 'ubuntu'" && userdel -f -r ubuntu || echo "Failed to delete 'ubuntu' user"; \
fi
13 changes: 8 additions & 5 deletions src/swift/.devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
{
"name": "Swift",
"image": "swift:${templateOption:imageVariant}",
"build": {
"dockerfile": "./Dockerfile",
"context": ".",
"args": {
"SWIFT_VERSION": "${templateOption:imageVariant}"
}
},
"features": {
"ghcr.io/devcontainers/features/common-utils:2": {
"installZsh": "false",
"username": "vscode",
"userUid": "1000",
"userGid": "1000",
"upgradePackages": "false"
},
"ghcr.io/devcontainers/features/git:1": {
Expand Down Expand Up @@ -36,6 +40,5 @@
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Set `remoteUser` to `root` to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "vscode"
"containerUser": "vscode"
}