From 26fa1435c7eead932592f070ff05474ca19939c4 Mon Sep 17 00:00:00 2001 From: Entity Date: Mon, 14 Oct 2024 12:26:13 +0200 Subject: [PATCH] Added an initial naive implementation of the Tauri Devcontainer --- .devcontainer/Dev.Dockerfile | 16 ++++++++++++++++ .devcontainer/devcontainer.json | 25 +++++++++++++++++++++++++ .devcontainer/docker-compose.yaml | 22 ++++++++++++++++++++++ 3 files changed, 63 insertions(+) create mode 100644 .devcontainer/Dev.Dockerfile create mode 100644 .devcontainer/devcontainer.json create mode 100644 .devcontainer/docker-compose.yaml diff --git a/.devcontainer/Dev.Dockerfile b/.devcontainer/Dev.Dockerfile new file mode 100644 index 0000000..d8d8fad --- /dev/null +++ b/.devcontainer/Dev.Dockerfile @@ -0,0 +1,16 @@ +FROM alpine:latest +# Install dependencies +RUN apk add --no-cache --update git ca-certificates curl openssh-client +# Add my user +RUN adduser Entity -h /home/Entity -S +RUN addgroup Entity +RUN adduser Entity Entity +# Switch to my user +USER Entity +# Install Rust +RUN curl https://sh.rustup.rs -sSf | sh -s -- -y +# Configure git to use my name, email and signing keys +RUN git config --global user.name Entity +RUN git config --global user.email entity@runeterra.be +RUN git config --global gpg.format ssh +RUN git config --global user.signingkey /home/Entity/.ssh/git.runeterra.be \ No newline at end of file diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..157d129 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,25 @@ +{ + "name": "ChangeME", + "dockerComposeFile": "./docker-compose.yaml", + "service": "Dev", + "overrideCommand": true, + "shutdownAction": "stopCompose", + "workspaceFolder": "/App", + "customizations": { + "vscode": { + "extensions": [ + "aaron-bond.better-comments", + "mikestead.dotenv", + "VisualStudioExptTeam.vscodeintellicode", + "christian-kohler.path-intellisense", + "vscode-icons-team.vscode-icons", + "redhat.vscode-xml", + "redhat.vscode-yaml", + "ms-vscode.vscode-typescript-next", + "rust-lang.rust-analyzer", + "dustypomerleau.rust-syntax", + "tamasfe.even-better-toml" + ] + } + } +} \ No newline at end of file diff --git a/.devcontainer/docker-compose.yaml b/.devcontainer/docker-compose.yaml new file mode 100644 index 0000000..1fcba24 --- /dev/null +++ b/.devcontainer/docker-compose.yaml @@ -0,0 +1,22 @@ +services: + Dev: + container_name: "ChangeMe-Dev" + build: + context: . + dockerfile: "./Dev.Dockerfile" + image: "ChangeMe:dev-latest" + networks: + - ChangeMe + volumes: + - "../:/App:rw" + - "Docker-SSH:/ssh:ro" + +networks: + ChangeMe: + name: "ChangeMe" + external: false + +volumes: + Docker-SSH: + name: "Docker-SSH" + external: true \ No newline at end of file