-
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Better fantomas on build * Better devcontainers
- Loading branch information
1 parent
a717b3c
commit 9c804e4
Showing
15 changed files
with
258 additions
and
243 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,17 @@ | ||
FROM debian:buster-slim | ||
|
||
|
||
RUN apt-get update \ | ||
&& apt-get install -y --no-install-recommends \ | ||
ca-certificates \ | ||
\ | ||
# .NET Core dependencies | ||
libc6 \ | ||
libgcc1 \ | ||
libgssapi-krb5-2 \ | ||
libicu63 \ | ||
libssl1.1 \ | ||
libstdc++6 \ | ||
zlib1g \ | ||
curl \ | ||
git \ | ||
procps \ | ||
wget \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
# [Choice] Debian version (use bullseye on local arm64/Apple Silicon): bookworm, bullseye, buster | ||
ARG VARIANT="bookworm" | ||
FROM buildpack-deps:${VARIANT}-curl | ||
|
||
|
||
ENV \ | ||
# Enable detection of running in a container | ||
DOTNET_RUNNING_IN_CONTAINER=true \ | ||
DOTNET_INSTALL_DIR=/usr/share/dotnet/ \ | ||
DOTNET_ROOT=/usr/share/dotnet/ | ||
|
||
COPY ./.devcontainer/install-dotnets.sh global.json* . | ||
|
||
RUN /bin/bash install-dotnets.sh | ||
|
||
ENV PATH="$DOTNET_ROOT:${PATH}" | ||
RUN ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet | ||
DOTNET_ROOT=/usr/share/dotnet/ \ | ||
DOTNET_NOLOGO=true \ | ||
DOTNET_CLI_TELEMETRY_OPTOUT=false\ | ||
DOTNET_USE_POLLING_FILE_WATCHER=true | ||
|
||
RUN dotnet --info | ||
|
||
# Copy endpoint specific user settings into container to specify | ||
# .NET Core should be used as the runtime. | ||
COPY ./.devcontainer/settings.vscode.json /root/.vscode-remote/data/Machine/settings.json | ||
# [Optional] Uncomment this section to install additional OS packages. | ||
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ | ||
# && apt-get -y install --no-install-recommends <your-package-list-here> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,73 @@ | ||
{ | ||
"name": "dotnet", | ||
// Set the build context one level higher so we can grab metadata like global.json | ||
"context": "..", | ||
"dockerFile": "Dockerfile", | ||
"forwardPorts": [ | ||
0 | ||
], | ||
"extensions": [ | ||
"ionide.ionide-fsharp", | ||
"ms-dotnettools.csharp", | ||
"editorconfig.editorconfig", | ||
"ionide.ionide-paket", | ||
"ionide.ionide-fake" | ||
] | ||
"name": "dotnet", | ||
// Set the build context one level higher so we can grab metadata like global.json | ||
"context": "..", | ||
"dockerFile": "Dockerfile", | ||
"forwardPorts": [ | ||
0 | ||
], | ||
"features": { | ||
// https://github.com/devcontainers/features/blob/main/src/common-utils/README.md | ||
"ghcr.io/devcontainers/features/common-utils:2": { | ||
"installZsh": true, | ||
"installOhMyZshConfig": true, | ||
"configureZshAsDefaultShell": true, | ||
"username": "vscode", | ||
"userUid": "1000", | ||
"userGid": "1000", | ||
"upgradePackages": true | ||
}, | ||
// https://github.com/devcontainers/features/blob/main/src/github-cli/README.md | ||
"ghcr.io/devcontainers/features/github-cli:1": {}, | ||
// https://github.com/devcontainers-contrib/features/blob/main/src/starship/README.md | ||
"ghcr.io/devcontainers-contrib/features/starship:1": {}, | ||
// https://github.com/devcontainers/features/blob/main/src/dotnet/README.md | ||
"ghcr.io/devcontainers/features/dotnet:2": { | ||
"version": "7.0", | ||
"additionalVersions": "6.0" | ||
} | ||
}, | ||
"overrideFeatureInstallOrder": [ | ||
"ghcr.io/devcontainers/features/common-utils", | ||
"ghcr.io/devcontainers/features/github-cli", | ||
"ghcr.io/devcontainers-contrib/features/starship", | ||
"ghcr.io/devcontainers/features/dotnet" | ||
], | ||
"customizations": { | ||
"vscode": { | ||
// Add the IDs of extensions you want installed when the container is created. | ||
"extensions": [ | ||
"ms-dotnettools.csharp", | ||
"Ionide.Ionide-fsharp", | ||
"tintoy.msbuild-project-tools", | ||
"ionide.ionide-paket", | ||
"usernamehw.errorlens", | ||
"alefragnani.Bookmarks", | ||
"oderwat.indent-rainbow", | ||
"vscode-icons-team.vscode-icons", | ||
"EditorConfig.EditorConfig", | ||
"ms-azuretools.vscode-docker", | ||
"GitHub.vscode-pull-request-github", | ||
"github.vscode-github-actions" | ||
], | ||
"settings": { | ||
"terminal.integrated.defaultProfile.linux": "zsh", | ||
"csharp.suppressDotnetInstallWarning": true | ||
} | ||
} | ||
}, | ||
"remoteUser": "vscode", | ||
"containerUser": "vscode", | ||
"containerEnv": { | ||
// Expose the local environment variable to the container | ||
// They are used for releasing and publishing from the container | ||
"GITHUB_TOKEN": "${localEnv:GITHUB_TOKEN}" | ||
}, | ||
"onCreateCommand": { | ||
"enable-starship": "echo 'eval \"$(starship init zsh)\"' >> ~/.zshrc" | ||
}, | ||
"postAttachCommand": { | ||
"restore": "dotnet tool restore && dotnet restore" | ||
}, | ||
"waitFor": "updateContentCommand" | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,17 @@ | ||
FROM debian:buster-slim | ||
|
||
|
||
RUN apt-get update \ | ||
&& apt-get install -y --no-install-recommends \ | ||
ca-certificates \ | ||
\ | ||
# .NET Core dependencies | ||
libc6 \ | ||
libgcc1 \ | ||
libgssapi-krb5-2 \ | ||
libicu63 \ | ||
libssl1.1 \ | ||
libstdc++6 \ | ||
zlib1g \ | ||
curl \ | ||
git \ | ||
procps \ | ||
wget \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
# [Choice] Debian version (use bullseye on local arm64/Apple Silicon): bookworm, bullseye, buster | ||
ARG VARIANT="bookworm" | ||
FROM buildpack-deps:${VARIANT}-curl | ||
|
||
|
||
ENV \ | ||
# Enable detection of running in a container | ||
DOTNET_RUNNING_IN_CONTAINER=true \ | ||
DOTNET_INSTALL_DIR=/usr/share/dotnet/ \ | ||
DOTNET_ROOT=/usr/share/dotnet/ | ||
|
||
COPY ./.devcontainer/install-dotnets.sh global.json* ./ | ||
|
||
RUN /bin/bash install-dotnets.sh | ||
|
||
ENV PATH="$DOTNET_ROOT:${PATH}" | ||
RUN ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet | ||
DOTNET_ROOT=/usr/share/dotnet/ \ | ||
DOTNET_NOLOGO=true \ | ||
DOTNET_CLI_TELEMETRY_OPTOUT=false\ | ||
DOTNET_USE_POLLING_FILE_WATCHER=true | ||
|
||
RUN dotnet --info | ||
|
||
# Copy endpoint specific user settings into container to specify | ||
# .NET Core should be used as the runtime. | ||
COPY ./.devcontainer/settings.vscode.json /root/.vscode-remote/data/Machine/settings.json | ||
# [Optional] Uncomment this section to install additional OS packages. | ||
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ | ||
# && apt-get -y install --no-install-recommends <your-package-list-here> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,73 @@ | ||
{ | ||
"name": "dotnet", | ||
// Set the build context one level higher so we can grab metadata like global.json | ||
"context": "..", | ||
"dockerFile": "Dockerfile", | ||
"forwardPorts": [ | ||
0 | ||
], | ||
"extensions": [ | ||
"ionide.ionide-fsharp", | ||
"ms-dotnettools.csharp", | ||
"editorconfig.editorconfig", | ||
"ionide.ionide-paket", | ||
"ionide.ionide-fake" | ||
] | ||
"name": "dotnet", | ||
// Set the build context one level higher so we can grab metadata like global.json | ||
"context": "..", | ||
"dockerFile": "Dockerfile", | ||
"forwardPorts": [ | ||
0 | ||
], | ||
"features": { | ||
// https://github.com/devcontainers/features/blob/main/src/common-utils/README.md | ||
"ghcr.io/devcontainers/features/common-utils:2": { | ||
"installZsh": true, | ||
"installOhMyZshConfig": true, | ||
"configureZshAsDefaultShell": true, | ||
"username": "vscode", | ||
"userUid": "1000", | ||
"userGid": "1000", | ||
"upgradePackages": true | ||
}, | ||
// https://github.com/devcontainers/features/blob/main/src/github-cli/README.md | ||
"ghcr.io/devcontainers/features/github-cli:1": {}, | ||
// https://github.com/devcontainers-contrib/features/blob/main/src/starship/README.md | ||
"ghcr.io/devcontainers-contrib/features/starship:1": {}, | ||
// https://github.com/devcontainers/features/blob/main/src/dotnet/README.md | ||
"ghcr.io/devcontainers/features/dotnet:2": { | ||
"version": "7.0", | ||
"additionalVersions": "6.0" | ||
} | ||
}, | ||
"overrideFeatureInstallOrder": [ | ||
"ghcr.io/devcontainers/features/common-utils", | ||
"ghcr.io/devcontainers/features/github-cli", | ||
"ghcr.io/devcontainers-contrib/features/starship", | ||
"ghcr.io/devcontainers/features/dotnet" | ||
], | ||
"customizations": { | ||
"vscode": { | ||
// Add the IDs of extensions you want installed when the container is created. | ||
"extensions": [ | ||
"ms-dotnettools.csharp", | ||
"Ionide.Ionide-fsharp", | ||
"tintoy.msbuild-project-tools", | ||
"ionide.ionide-paket", | ||
"usernamehw.errorlens", | ||
"alefragnani.Bookmarks", | ||
"oderwat.indent-rainbow", | ||
"vscode-icons-team.vscode-icons", | ||
"EditorConfig.EditorConfig", | ||
"ms-azuretools.vscode-docker", | ||
"GitHub.vscode-pull-request-github", | ||
"github.vscode-github-actions" | ||
], | ||
"settings": { | ||
"terminal.integrated.defaultProfile.linux": "zsh", | ||
"csharp.suppressDotnetInstallWarning": true | ||
} | ||
} | ||
}, | ||
"remoteUser": "vscode", | ||
"containerUser": "vscode", | ||
"containerEnv": { | ||
// Expose the local environment variable to the container | ||
// They are used for releasing and publishing from the container | ||
"GITHUB_TOKEN": "${localEnv:GITHUB_TOKEN}" | ||
}, | ||
"onCreateCommand": { | ||
"enable-starship": "echo 'eval \"$(starship init zsh)\"' >> ~/.zshrc" | ||
}, | ||
"postAttachCommand": { | ||
"restore": "dotnet tool restore && dotnet restore" | ||
}, | ||
"waitFor": "updateContentCommand" | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.