Initialize container
This commit is contained in:
commit
d51bc2c510
22
.devcontainer/Dockerfile
Normal file
22
.devcontainer/Dockerfile
Normal file
@ -0,0 +1,22 @@
|
||||
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 \
|
||||
genisoimage \
|
||||
&& 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
|
||||
23
.devcontainer/devcontainer.json
Normal file
23
.devcontainer/devcontainer.json
Normal file
@ -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"
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user