-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
73 additions
and
32 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,29 +1,28 @@ | ||
FROM mcr.microsoft.com/vscode/devcontainers/base:ubuntu-20.04 | ||
# [Choice] Debian version (use bullseye on local arm64/Apple Silicon): bookworm, bullseye, buster | ||
ARG VARIANT="bookworm" | ||
FROM buildpack-deps:${VARIANT}-curl | ||
|
||
RUN apt-get update \ | ||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ | ||
wget \ | ||
ca-certificates \ | ||
\ | ||
# .NET dependencies | ||
libc6 \ | ||
libgcc1 \ | ||
libgssapi-krb5-2 \ | ||
libicu66 \ | ||
libssl1.1 \ | ||
libstdc++6 \ | ||
zlib1g \ | ||
\ | ||
# Mono | ||
mono-devel \ | ||
# Install Microsoft package feed | ||
&& wget -q https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb \ | ||
&& dpkg -i packages-microsoft-prod.deb \ | ||
&& rm packages-microsoft-prod.deb \ | ||
\ | ||
# Install .NET 6 & 7 | ||
&& apt-get update \ | ||
&& apt-get install -y --no-install-recommends \ | ||
dotnet-sdk-6.0 \ | ||
dotnet-sdk-7.0 \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
USER root | ||
|
||
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ | ||
&& apt-get upgrade -y \ | ||
&& apt-get -y install --no-install-recommends \ | ||
# Mono | ||
mono-devel | ||
|
||
ARG USERNAME=developer | ||
ARG USER_UID=1000 | ||
ARG USER_GID=$USER_UID | ||
|
||
# Create the user | ||
RUN groupadd --gid $USER_GID $USERNAME \ | ||
&& useradd -s /bin/bash --uid $USER_UID --gid $USER_GID -m $USERNAME \ | ||
# | ||
# [Optional] Add sudo support. Omit if you don't need to install software after connecting. | ||
&& apt-get install -y sudo \ | ||
&& echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \ | ||
&& chmod 0440 /etc/sudoers.d/$USERNAME | ||
|
||
USER $USERNAME | ||
|
||
LABEL org.opencontainers.image.source="https://github.com/butr/bannerlord.blse" |
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,11 +1,53 @@ | ||
{ | ||
"name": ".NET Core & Mono", | ||
"name": ".NET & Mono & Powershell", | ||
"dockerFile": "Dockerfile", | ||
"build": { | ||
"dockerfile": "Dockerfile" | ||
"cacheFrom": "ghcr.io/butr/bannerlord.blse:latest" | ||
}, | ||
"features": { | ||
"ghcr.io/devcontainers/features/git:1": { | ||
"version": "latest", | ||
"ppa": "false" | ||
}, | ||
"ghcr.io/devcontainers/features/dotnet:2": { | ||
|
||
}, | ||
"ghcr.io/devcontainers/features/powershell:1": { | ||
"version": "latest" | ||
"version": "latest" | ||
} | ||
}, | ||
"overrideFeatureInstallOrder": [ | ||
"ghcr.io/devcontainers/features/git", | ||
"ghcr.io/devcontainers/features/dotnet", | ||
"ghcr.io/devcontainers/features/powershell" | ||
], | ||
"mounts": [ | ||
"source=${localEnv:BANNERLORD_GAME_DIR},target=/bannerlord,type=bind,consistency=default" | ||
], | ||
"containerEnv": { | ||
"BANNERLORD_GAME_DIR": "/bannerlord", | ||
"BANNERLORD_BUTR_COMPATIBILITY_SCORE_URL": "${localEnv:BANNERLORD_BUTR_COMPATIBILITY_SCORE_URL}" | ||
}, | ||
"postAttachCommand": "dotnet restore src/Bannerlord.BLSE.sln", | ||
"customizations": { | ||
"vscode": { | ||
"extensions": [ | ||
"ms-vscode.powershell", | ||
"github.vscode-github-actions", | ||
"ms-azuretools.vscode-docker", | ||
"ms-dotnettools.csdevkit" | ||
], | ||
"settings": { | ||
"terminal.integrated.defaultProfile.linux": "pwsh", | ||
"terminal.integrated.profiles.linux": { | ||
"path": { | ||
"path": "/usr/local/bin/pwsh" | ||
} | ||
}, | ||
"powershell.powerShellAdditionalExePaths": { | ||
"pwsh": "/usr/local/bin/pwsh" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |