one repo to rule them all
This commit is contained in:
commit
ebc651c715
5 changed files with 115 additions and 0 deletions
47
.devcontainer/Dockerfile
Normal file
47
.devcontainer/Dockerfile
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
FROM library/python:3.12-bullseye
|
||||
|
||||
ARG USER=vscode
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
# Install system dependencies in a single layer
|
||||
RUN apt update && apt install -y --no-install-recommends \
|
||||
sudo jq vim curl\
|
||||
&& apt autoremove -y \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Create the user and grant sudo privileges
|
||||
RUN useradd -m -s /bin/bash ${USER} \
|
||||
&& echo "${USER} ALL=(ALL) NOPASSWD: ALL" >/etc/sudoers.d/${USER} \
|
||||
&& chmod 0440 /etc/sudoers.d/${USER}
|
||||
|
||||
# Install Poetry
|
||||
RUN pip install --no-cache-dir poetry
|
||||
|
||||
|
||||
# Install Node.js 22 (from NodeSource)
|
||||
RUN curl -fsSL https://deb.nodesource.com/setup_22.x | bash - \
|
||||
&& apt install -y nodejs \
|
||||
&& node -v \
|
||||
&& npm -v
|
||||
|
||||
|
||||
# # Install aws
|
||||
# RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
|
||||
# RUN unzip awscliv2.zip
|
||||
# RUN ./aws/install
|
||||
|
||||
# # Install terraform
|
||||
# RUN apt-get update && sudo apt-get install -y gnupg software-properties-common
|
||||
# RUN wget -O- https://apt.releases.hashicorp.com/gpg | \
|
||||
# gpg --dearmor | \
|
||||
# sudo tee /usr/share/keyrings/hashicorp-archive-keyring.gpg > /dev/null
|
||||
# RUN echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] \
|
||||
# https://apt.releases.hashicorp.com $(lsb_release -cs) main" | \
|
||||
# tee /etc/apt/sources.list.d/hashicorp.list
|
||||
# RUN apt update
|
||||
# RUN apt-get install terraform
|
||||
# RUN terraform -install-autocomplete
|
||||
|
||||
|
||||
# Set the working directory
|
||||
WORKDIR /workspaces/one_repo_to_rule_them_all
|
||||
37
.devcontainer/devcontainer.json
Normal file
37
.devcontainer/devcontainer.json
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
{
|
||||
"name": "Basic Python",
|
||||
"dockerComposeFile": "docker-compose.yml",
|
||||
"service": "one_repo_to_rule_them_all",
|
||||
"remoteUser": "vscode",
|
||||
"workspaceFolder": "/workspaces/one_repo_to_rule_them_all",
|
||||
"postStartCommand": "bash .devcontainer/post-install.sh",
|
||||
|
||||
"features": {
|
||||
// "ghcr.io/devcontainers/features/ssh-agent:1": {}
|
||||
},
|
||||
|
||||
"mounts": [
|
||||
// Optional convenience mount
|
||||
"source=${localEnv:HOME},target=/workspaces/home,type=bind"
|
||||
],
|
||||
|
||||
"customizations": {
|
||||
"vscode": {
|
||||
"settings": {
|
||||
"files.defaultWorkspace": "/workspaces/one_repo_to_rule_them_all"
|
||||
},
|
||||
"extensions": [
|
||||
"ms-python.python",
|
||||
"ms-toolsai.jupyter",
|
||||
"mechatroner.rainbow-csv",
|
||||
"ms-toolsai.datawrangler",
|
||||
"lindacong.vscode-book-reader",
|
||||
"4ops.terraform",
|
||||
"fabiospampinato.vscode-todo-plus",
|
||||
"jgclark.vscode-todo-highlight",
|
||||
"corentinartaud.pdfpreview"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
11
.devcontainer/docker-compose.yml
Normal file
11
.devcontainer/docker-compose.yml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
version: '3.8'
|
||||
|
||||
services:
|
||||
one_repo_to_rule_them_all:
|
||||
user: "${UID}:${GID}"
|
||||
build:
|
||||
context: ..
|
||||
dockerfile: .devcontainer/Dockerfile
|
||||
command: sleep infinity
|
||||
volumes:
|
||||
- ..:/workspaces/one_repo_to_rule_them_all
|
||||
1
.devcontainer/post-install.sh
Normal file
1
.devcontainer/post-install.sh
Normal file
|
|
@ -0,0 +1 @@
|
|||
# Place holder
|
||||
19
.vscode/settings.json
vendored
Normal file
19
.vscode/settings.json
vendored
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
"jupyter.interactiveWindow.textEditor.executeSelection": true,
|
||||
"python.REPL.sendToNativeREPL": true,
|
||||
"notebook.output.scrolling": true,
|
||||
"terminal.integrated.defaultProfile.linux": "bash",
|
||||
"editor.rulers": [67],
|
||||
"terminal.integrated.profiles.linux": {
|
||||
"bash": {
|
||||
"path": "/bin/bash"
|
||||
}
|
||||
},
|
||||
|
||||
// Hot reload setting that needs to be in user settings
|
||||
// "jupyter.runStartupCommands": [
|
||||
// "%load_ext autoreload", "%autoreload 2"
|
||||
// ]
|
||||
|
||||
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue