More tweaking on the devcontainer
This commit is contained in:
@@ -3,17 +3,5 @@
|
|||||||
# [Choice] Debian version (use bullseye on local arm64/Apple Silicon): bullseye, buster
|
# [Choice] Debian version (use bullseye on local arm64/Apple Silicon): bullseye, buster
|
||||||
ARG VARIANT=bullseye
|
ARG VARIANT=bullseye
|
||||||
FROM mcr.microsoft.com/vscode/devcontainers/base:${VARIANT}
|
FROM mcr.microsoft.com/vscode/devcontainers/base:${VARIANT}
|
||||||
|
COPY ./install_tools.sh /tmp/install_tools.sh
|
||||||
RUN apt update \
|
RUN /tmp/install_tools.sh
|
||||||
&& apt upgrade -y \
|
|
||||||
&& apt install -y \
|
|
||||||
build-essential git wget binfmt-support qemu gcc-9 \
|
|
||||||
parted udev zerofree gcc-avr avr-libc avrdude python3 python3-pip python3-tornado \
|
|
||||||
inetutils-ping curl unzip python3-setuptools gcc-arm-linux-gnueabihf bc vim locate sudo \
|
|
||||||
&& update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 9 \
|
|
||||||
&& /usr/bin/python3 -m pip install -U yapf \
|
|
||||||
&& curl -fsSL https://deb.nodesource.com/setup_18.x | bash - \
|
|
||||||
&& apt install -y nodejs \
|
|
||||||
&& mkdir -p /root/.ssh \
|
|
||||||
&& echo "Host onefinity" > /root/.ssh/config \
|
|
||||||
&& echo "\tUser bbmc" >> /root/.ssh/config
|
|
||||||
|
|||||||
@@ -1,26 +1,35 @@
|
|||||||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
|
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
|
||||||
// https://github.com/microsoft/vscode-dev-containers/blob/v0.241.1/containers/debian
|
// https://github.com/microsoft/vscode-dev-containers/blob/v0.241.1/containers/debian
|
||||||
{
|
{
|
||||||
"name": "Debian",
|
"name": "Debian",
|
||||||
"build": {
|
"build": {
|
||||||
"dockerfile": "Dockerfile",
|
"dockerfile": "Dockerfile",
|
||||||
// Update 'VARIANT' to pick an Debian version: bullseye, buster
|
// Update 'VARIANT' to pick an Debian version: bullseye, buster
|
||||||
// Use bullseye on local arm64/Apple Silicon.
|
// Use bullseye on local arm64/Apple Silicon.
|
||||||
"args": { "VARIANT": "bullseye" }
|
"args": {
|
||||||
},
|
"VARIANT": "bullseye"
|
||||||
|
}
|
||||||
"runArgs": ["--privileged"],
|
},
|
||||||
|
"runArgs": [
|
||||||
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
// The primary reason this is here is to enable loopback devices,
|
||||||
// "forwardPorts": [],
|
// which are used for mounting disk images during builds, etc.
|
||||||
|
"--privileged"
|
||||||
// Uncomment to use the Docker CLI from inside the container. See https://aka.ms/vscode-remote/samples/docker-from-docker.
|
],
|
||||||
// "mounts": [ "source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind" ],
|
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
||||||
|
// "forwardPorts": [],
|
||||||
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
|
//
|
||||||
// "remoteUser": "vscode",
|
// Uncomment to use the Docker CLI from inside the container. See https://aka.ms/vscode-remote/samples/docker-from-docker.
|
||||||
|
// "mounts": [ "source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind" ],
|
||||||
"features": {
|
"features": {
|
||||||
"sshd": "latest"
|
"sshd": "latest"
|
||||||
}
|
},
|
||||||
}
|
"extensions": [
|
||||||
|
"ms-azuretools.vscode-docker",
|
||||||
|
"dbaeumer.vscode-eslint",
|
||||||
|
"eamodio.gitlens",
|
||||||
|
"ms-vscode.makefile-tools",
|
||||||
|
"ms-python.python",
|
||||||
|
"svelte.svelte-vscode",
|
||||||
|
"redhat.vscode-yaml"
|
||||||
|
]
|
||||||
|
}
|
||||||
46
.devcontainer/install_tools.sh
Executable file
46
.devcontainer/install_tools.sh
Executable file
@@ -0,0 +1,46 @@
|
|||||||
|
#!/usr/bin/env -S bash -e
|
||||||
|
|
||||||
|
APT_PACKAGES=(
|
||||||
|
"build-essential"
|
||||||
|
"git"
|
||||||
|
"wget"
|
||||||
|
"binfmt-support"
|
||||||
|
"qemu"
|
||||||
|
"gcc-9"
|
||||||
|
"parted"
|
||||||
|
"udev"
|
||||||
|
"zerofree"
|
||||||
|
"gcc-avr"
|
||||||
|
"avr-libc"
|
||||||
|
"avrdude"
|
||||||
|
"python3"
|
||||||
|
"python3-pip"
|
||||||
|
"python3-tornado"
|
||||||
|
"inetutils-ping"
|
||||||
|
"curl"
|
||||||
|
"unzip"
|
||||||
|
"python3-setuptools"
|
||||||
|
"gcc-arm-linux-gnueabihf"
|
||||||
|
"bc"
|
||||||
|
"vim"
|
||||||
|
"locate"
|
||||||
|
"sudo"
|
||||||
|
)
|
||||||
|
|
||||||
|
apt-get update
|
||||||
|
apt-get upgrade -y
|
||||||
|
|
||||||
|
apt-get install -y "${APT_PACKAGES[@]}"
|
||||||
|
|
||||||
|
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 9
|
||||||
|
|
||||||
|
/usr/bin/python3 -m pip install -U yapf
|
||||||
|
|
||||||
|
curl -fsSL https://deb.nodesource.com/setup_18.x | bash -
|
||||||
|
apt-get install -y nodejs
|
||||||
|
|
||||||
|
mkdir -p /root/.ssh
|
||||||
|
cat > /root/.ssh/config <<- END
|
||||||
|
Host onefinity
|
||||||
|
User bbmc
|
||||||
|
END
|
||||||
Reference in New Issue
Block a user