rm dev container docker file
This commit is contained in:
@@ -1,14 +0,0 @@
|
|||||||
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.245.2/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}
|
|
||||||
|
|
||||||
RUN mkdir /nix \
|
|
||||||
&& chown vscode /nix \
|
|
||||||
&& su vscode -c "sh <(curl -L https://nixos.org/nix/install) --no-daemon"
|
|
||||||
|
|
||||||
RUN su vscode -c "/home/vscode/.nix-profile/bin/nix-env -i nixpkgs-fmt"
|
|
||||||
|
|
||||||
RUN echo 'nix --experimental-features "nix-command flakes" develop' > /usr/bin/devShell \
|
|
||||||
&& chmod +x /usr/bin/devShell
|
|
||||||
9
.devcontainer/dev_shell/devcontainer-feature.json
Normal file
9
.devcontainer/dev_shell/devcontainer-feature.json
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"name": "DevShell",
|
||||||
|
"id": "dev_shell",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"description": "A nix based dev shell",
|
||||||
|
"installsAfter": [
|
||||||
|
"ghcr.io/devcontainers/features/nix:1"
|
||||||
|
]
|
||||||
|
}
|
||||||
6
.devcontainer/dev_shell/install.sh
Normal file
6
.devcontainer/dev_shell/install.sh
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
#!/bin/env sh
|
||||||
|
|
||||||
|
nix-env -i nixpkgs-fmt
|
||||||
|
|
||||||
|
echo 'nix --experimental-features "nix-command flakes" develop' > /usr/bin/devShell
|
||||||
|
chmod +x /usr/bin/devShell
|
||||||
@@ -1,29 +1,32 @@
|
|||||||
// 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.245.2/containers/ubuntu
|
|
||||||
{
|
{
|
||||||
"name": "Ubuntu",
|
"name": "Ubuntu",
|
||||||
"build": {
|
"image": "mcr.microsoft.com/devcontainers/base:jammy",
|
||||||
"dockerfile": "Dockerfile",
|
"features": {
|
||||||
// Update 'VARIANT' to pick an Ubuntu version: jammy / ubuntu-22.04, focal / ubuntu-20.04, bionic /ubuntu-18.04
|
"ghcr.io/devcontainers/features/docker-from-docker:1": {},
|
||||||
// Use ubuntu-22.04 or ubuntu-18.04 on local arm64/Apple Silicon.
|
"ghcr.io/devcontainers/features/nix:1": {},
|
||||||
"args": { "VARIANT": "ubuntu-22.04" }
|
"./dev_shell": {}
|
||||||
},
|
},
|
||||||
"extensions": [
|
// Features to add to the dev container. More info: https://containers.dev/implementors/features.
|
||||||
"donjayamanne.githistory",
|
// "features": {},
|
||||||
"jnoortheen.nix-ide",
|
|
||||||
"ms-azuretools.vscode-docker",
|
|
||||||
"eamodio.gitlens",
|
|
||||||
"streetsidesoftware.code-spell-checker"
|
|
||||||
],
|
|
||||||
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
||||||
// "forwardPorts": [],
|
// "forwardPorts": [],
|
||||||
|
|
||||||
// Use 'postCreateCommand' to run commands after the container is created.
|
// Use 'postCreateCommand' to run commands after the container is created.
|
||||||
// "postCreateCommand": "uname -a",
|
//"onCreateCommand":"nix-env -i nixpkgs-fmt",
|
||||||
|
// Configure tool-specific properties.
|
||||||
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
|
"customizations": {
|
||||||
"remoteUser": "vscode",
|
// Configure properties specific to VS Code.
|
||||||
"features": {
|
"vscode": {
|
||||||
"docker-from-docker": "latest"
|
// Set *default* container specific settings.json values on container create.
|
||||||
|
"settings": {},
|
||||||
|
"extensions": [
|
||||||
|
"donjayamanne.githistory",
|
||||||
|
"jnoortheen.nix-ide",
|
||||||
|
"ms-azuretools.vscode-docker",
|
||||||
|
"eamodio.gitlens",
|
||||||
|
"streetsidesoftware.code-spell-checker"
|
||||||
|
]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
|
||||||
|
// "remoteUser": "root"
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user