From 97e58d4eb444fbb7d0c1e03e4527089b02d0170e Mon Sep 17 00:00:00 2001 From: Sho Ishida Date: Tue, 14 Jul 2026 03:02:46 +0000 Subject: [PATCH] Initialize minimal container --- .devcontainer/Dockerfile | 21 +++++++++++++++++++++ .devcontainer/devcontainer.json | 23 +++++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 .devcontainer/Dockerfile create mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 0000000..f85672f --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,21 @@ +FROM mcr.microsoft.com/devcontainers/python:1-3.12-bookworm + +RUN rm -f /etc/apt/sources.list.d/yarn.list \ + && apt-get update && apt-get install -y \ + curl \ + gnupg \ + software-properties-common \ + git \ + openssh-client \ + && rm -rf /var/lib/apt/lists/* + +RUN curl -fsSL https://apt.releases.hashicorp.com/gpg | gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg \ + && echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com bookworm main" | tee /etc/apt/sources.list.d/hashicorp.list \ + && apt-get update && apt-get install -y terraform \ + && rm -rf /var/lib/apt/lists/* + +RUN pip install --no-cache-dir --upgrade pip \ + && pip install --no-cache-dir \ + ansible \ + ansible-navigator \ + ansible-lint diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..2f19358 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,23 @@ +{ + "name": "Homelab Dev Container", + "build": { + "dockerfile": "Dockerfile" + }, + "customizations": { + "vscode": { + "extensions": [ + "ms-python.python", + "redhat.ansible", + "hashicorp.terraform", + "eamodio.gitlens" + ] + } + }, + "features": {}, + "mounts": [ + "source=${localEnv:HOME}/.ssh,target=/home/vscode/.ssh,type=bind,consistency=cached" + ], + "forwardPorts": [], + "postCreateCommand": "ssh-keyscan -H 172.30.1.200 >> ~/.ssh/known_hosts 2> /dev/null || true", + "remoteUser": "vscode" +}