Skip to content

Commit db461d2

Browse files
authored
Merge pull request #1502 from EverybodyKurts/feature/devcontainer
Add vscode devcontainer config
2 parents 6ac6ced + 04b6edc commit db461d2

File tree

5 files changed

+80
-1
lines changed

5 files changed

+80
-1
lines changed

.devcontainer/devcontainer.json

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
2+
// README at: https://github.com/devcontainers/templates/tree/main/src/docker-existing-dockerfile
3+
{
4+
"name": "Existing Dockerfile",
5+
"build": {
6+
// Sets the run context to one level up instead of the .devcontainer folder.
7+
"context": "..",
8+
// Update the 'dockerFile' property if you aren't using the standard 'Dockerfile' filename.
9+
"dockerfile": "../Dockerfile"
10+
},
11+
"customizations": {
12+
"vscode": {
13+
"extensions": [
14+
"ms-azuretools.vscode-docker",
15+
"ms-dotnettools.csdevkit",
16+
"Ionide.Ionide-fsharp",
17+
"Ionide.Ionide-Paket",
18+
"shardulm94.trailing-spaces",
19+
"esbenp.prettier-vscode",
20+
"DavidAnson.vscode-markdownlint",
21+
"yzhang.markdown-all-in-one"
22+
]
23+
}
24+
}
25+
26+
// Features to add to the dev container. More info: https://containers.dev/features.
27+
// "features": {},
28+
29+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
30+
// "forwardPorts": [],
31+
32+
// Uncomment the next line to run commands after the container is created.
33+
// "postCreateCommand": "cat /etc/os-release",
34+
35+
// Configure tool-specific properties.
36+
// "customizations": {},
37+
38+
// Uncomment to connect as an existing user other than the container default. More info: https://aka.ms/dev-containers-non-root.
39+
// "remoteUser": "devcontainer"
40+
}

.github/dependabot.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for more information:
4+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
# https://containers.dev/guide/dependabot
6+
7+
version: 2
8+
updates:
9+
- package-ecosystem: "devcontainers"
10+
directory: "/"
11+
schedule:
12+
interval: weekly

Dockerfile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
FROM mcr.microsoft.com/vscode/devcontainers/dotnet:7.0-bookworm-slim
2+
3+
ENV WORKDIR="/app" \
4+
USER="vscode"
5+
6+
WORKDIR $WORKDIR
7+
8+
COPY --chown=${USER}:${USER} . ${WORKDIR}
9+
10+
COPY --chown=${USERNAME}:${USERNAME} docker-entrypoint.sh /usr/bin/
11+
RUN chmod +x /usr/bin/docker-entrypoint.sh
12+
13+
ENTRYPOINT ["/usr/bin/docker-entrypoint.sh"]
14+
15+
RUN dotnet tool restore && \
16+
dotnet paket restore && \
17+
dotnet restore

docker-entrypoint.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
set -e
3+
4+
dotnet tool restore
5+
dotnet paket restore
6+
dotnet restore
7+
8+
9+
# Exec the container's main process (what's set as CMD in the Dockerfile).
10+
exec "$@"

global.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
"version": "8.0.400",
44
"rollForward": "major"
55
}
6-
}
6+
}

0 commit comments

Comments
 (0)