From d48f88a0245c87aeb85954055515ed8dbbae6870 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Th=C3=A9o=20Le=20Calvar?= <tlc@kher.nl>
Date: Fri, 18 Nov 2022 15:58:44 +0100
Subject: [PATCH] change debian base image to alpine

---
 .devcontainer/Dockerfile        | 15 +++++----------
 .devcontainer/devcontainer.json | 12 +++---------
 2 files changed, 8 insertions(+), 19 deletions(-)

diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile
index 33154a1..a62669d 100644
--- a/.devcontainer/Dockerfile
+++ b/.devcontainer/Dockerfile
@@ -1,13 +1,8 @@
 # See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.234.0/containers/cpp/.devcontainer/base.Dockerfile
 
-# [Choice] Debian / Ubuntu version (use Debian 11, Ubuntu 18.04/22.04 on local arm64/Apple Silicon): debian-11, debian-10, ubuntu-22.04, ubuntu-20.04, ubuntu-18.04
-ARG VARIANT="bullseye"
-FROM mcr.microsoft.com/vscode/devcontainers/cpp:0-${VARIANT}
+FROM alpine:latest
 
-# [Optional] Uncomment this section to install additional vcpkg ports.
-# RUN su vscode -c "${VCPKG_ROOT}/vcpkg install <your-port-name-here>"
-
-# [Optional] Uncomment this section to install additional packages.
-RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
-    && apt-get -y install --no-install-recommends qemu-system-x86 novnc \
-    && rm -rf /var/lib/apt/lists/*
+RUN apk add bash g++ gdb make qemu qemu-img qemu-system-x86_64 qemu-system-i386 qemu-ui-curses && \
+    adduser -D -s /bin/bash vscode && \
+    touch /home/vscode/.bashrc && \
+    chown vscode:vscode /home/vscode/.bashrc
\ No newline at end of file
diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json
index 23aa26b..f42ea00 100644
--- a/.devcontainer/devcontainer.json
+++ b/.devcontainer/devcontainer.json
@@ -1,14 +1,11 @@
 // 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.234.0/containers/cpp
 {
-	"name": "C++",
+	"name": "Sextant-dev",
 	"build": {
 		"dockerfile": "Dockerfile",
-		// Update 'VARIANT' to pick an Debian / Ubuntu OS version: debian-11, debian-10, ubuntu-22.04, ubuntu-20.04, ubuntu-18.04
-		// Use Debian 11, Ubuntu 18.04 or Ubuntu 22.04 on local arm64/Apple Silicon
-		"args": { "VARIANT": "debian-11" }
 	},
-	"runArgs": ["--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined"],
+	// "runArgs": ["--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined"],
 
 	// Set *default* container specific settings.json values on container create.
 	"settings": {},
@@ -22,13 +19,10 @@
 	],
 
 	// Use 'forwardPorts' to make a list of ports inside the container available locally.
-	"forwardPorts": [
-		6080 // web port of novnc
-	],
+	"forwardPorts": [],
 
 	// Use 'postCreateCommand' to run commands after the container is created.
 	// "postCreateCommand": "gcc -v",
-	"postAttachCommand": "/usr/share/novnc/utils/launch.sh",
 
 	// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
 	"remoteUser": "vscode"
-- 
GitLab