Skip to content
This repository has been archived by the owner on Oct 21, 2024. It is now read-only.

Commit

Permalink
Add Dockerfile and devcontainer.json for F# (.NET)
Browse files Browse the repository at this point in the history
development
  • Loading branch information
AngelMunoz committed Nov 18, 2023
1 parent 469b72b commit e594984
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM mcr.microsoft.com/devcontainers/base:ubuntu-22.04

RUN curl -fsSL https://dotnet.microsoft.com/download/dotnet/scripts/v1/dotnet-install.sh | bash /dev/stdin -c 8.0 --install-dir /home/vscode/.dotnet

ENV DOTNET_ROOT=/home/vscode/.dotnet
ENV PATH=$PATH:$DOTNET_ROOT:$DOTNET_ROOT/tools

RUN chown -R vscode:vscode $DOTNET_ROOT
39 changes: 39 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
// 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-fsharp
{
"name": "F# (.NET)",
// Or 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": {},
// Configure tool-specific properties.
"customizations": {
// Configure properties specific to VS Code.
"vscode": {
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"Ionide.Ionide-fsharp",
"ms-dotnettools.csharp",
"EditorConfig.EditorConfig",
//"GitHub.copilot",
//"GitHub.copilot-chat",
// "WakaTime.vscode-wakatime",
"eamodio.gitlens"
]
}
},
"features": {
"ghcr.io/devcontainers/features/git:1": {},
"ghcr.io/devcontainers/features/powershell:1": {}
},
// 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": [
"dotnet tool restore && ",
"dotnet paket restore && ",
"dotnet build"
]
}

0 comments on commit e594984

Please sign in to comment.