This commit is contained in:
stubbfelnewpc
2022-08-25 18:34:19 +00:00
commit 2d2a929a9e
6 changed files with 120 additions and 0 deletions

15
.devcontainer/Dockerfile Normal file
View File

@@ -0,0 +1,15 @@
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.241.1/containers/ubuntu/.devcontainer/base.Dockerfile
# [Choice] Ubuntu version (use ubuntu-22.04 or ubuntu-18.04 on local arm64/Apple Silicon): ubuntu-22.04, ubuntu-20.04, ubuntu-18.04
ARG VARIANT="jammy"
FROM mcr.microsoft.com/vscode/devcontainers/base:0-${VARIANT}
# [Optional] Uncomment this section to install additional OS packages.
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
&& apt-get -y install --no-install-recommends xz-utils bc docker.io
RUN mkdir /nix \
&& chown vscode /nix \
&& su vscode -c "sh <(curl -L https://releases.nixos.org/nix/nix-2.10.3/install) --no-daemon"
RUN su vscode -c "/home/vscode/.nix-profile/bin/nix-env -i nixpkgs-fmt"

View File

@@ -0,0 +1,31 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.241.1/containers/ubuntu
{
"name": "Ubuntu",
"build": {
"dockerfile": "Dockerfile",
// Update 'VARIANT' to pick an Ubuntu version: jammy / ubuntu-22.04, focal / ubuntu-20.04, bionic /ubuntu-18.04
// Use ubuntu-22.04 or ubuntu-18.04 on local arm64/Apple Silicon.
"args": {
"VARIANT": "ubuntu-22.04"
}
},
// 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": "uname -a",
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "vscode",
"features": {
"docker-from-docker": "latest"
},
"customizations": {
"vscode": {
"extensions": [
"mhutchie.git-graph",
"eamodio.gitlens",
"jnoortheen.nix-ide"
]
}
}
}