Skip to content

Commit

Permalink
feat(dev-env): add vscode devcontainer
Browse files Browse the repository at this point in the history
  • Loading branch information
T-Ernst committed Dec 10, 2024
1 parent e128cfc commit 8c6b45a
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/dotnet
{
"name": "t4 DevEnv",
// Use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"build": {
"dockerfile": "Dockerfile"
},

// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "sudo pwsh -Command \"Install-Module -Name PSScriptAnalyzer -Force -Scope AllUsers\"",

// Configure tool-specific properties.
"customizations": {
"vscode": {
"extensions": [
"streetsidesoftware.code-spell-checker",
"DavidAnson.vscode-markdownlint",
"ms-dotnettools.csdevkit",
"EditorConfig.EditorConfig"
]
}
}

// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
22 changes: 22 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# syntax=docker/dockerfile:1

ARG DOTNET_VERSION=7.0
ARG DEBIAN_VERSION=bookworm

FROM mcr.microsoft.com/devcontainers/dotnet:1-${DOTNET_VERSION}-${DEBIAN_VERSION}

RUN <<EOT
set -eu

DEBIAN_FRONTEND=noninteractive

apt-get update
apt-get install -y \
dos2unix

apt-get autoremove -y
apt-get clean
rm -rf /var/lib/apt/lists/*
EOT

ENTRYPOINT ["/bin/bash"]

0 comments on commit 8c6b45a

Please sign in to comment.