From 26bb0b95341bd7c63fe5a4c58d138e534f532225 Mon Sep 17 00:00:00 2001 From: KemoNine Date: Sun, 1 May 2022 13:30:57 -0400 Subject: [PATCH] setup vscode dev container config / implementation similar to the ardux qmk one --- .devcontainer/Dockerfile | 4 ++++ .devcontainer/bashrc | 8 ++++++++ .devcontainer/devcontainer.json | 16 ++++++++++++++++ .gitignore | 1 + 4 files changed, 29 insertions(+) create mode 100644 .devcontainer/Dockerfile create mode 100644 .devcontainer/bashrc create mode 100644 .devcontainer/devcontainer.json create mode 100644 .gitignore diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 0000000..c0b74c8 --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,4 @@ +FROM docker.io/zmkfirmware/zmk-dev-arm:stable + +COPY bashrc tmp +RUN mv /tmp/bashrc ~/.bashrc \ No newline at end of file diff --git a/.devcontainer/bashrc b/.devcontainer/bashrc new file mode 100644 index 0000000..9fdb8f6 --- /dev/null +++ b/.devcontainer/bashrc @@ -0,0 +1,8 @@ +export LS_OPTIONS='-F --color=auto' +alias ls='ls $LS_OPTIONS' +if [ "${CODESPACES}" = "true" ]; then + export WORKSPACE_DIR="$HOME/workspace/zmk" +fi +if [ -f "$WORKSPACE_DIR/zephyr/zephyr-env.sh" ]; then + source "$WORKSPACE_DIR/zephyr/zephyr-env.sh" +fi diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..4543627 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,16 @@ +{ + "name": "ARDUX ZMK Development", + "dockerFile": "Dockerfile", + "runArgs": ["--security-opt", "label=disable"], + "extensions": ["ms-vscode.cpptools"], + "settings": { + "terminal.integrated.shell.linux": "/bin/bash" + }, + "forwardPorts": [3000], + "workspaceMount": "type=volume,source=zmk-src,target=/workspaces/zmk", + "workspaceFolder": "/workspaces", + "mounts": [ + "type=bind,source=${localWorkspaceFolder},target=/workspaces/zmk-ardux", + "type=bind,source=${localWorkspaceFolder}/.build,target=/workspaces/zmk/app/build" + ] +} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..329f3e5 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.build/ \ No newline at end of file