Skip to content

Commit 580ca90

Browse files
author
Alan Christie
committed
feat: Initial file set
1 parent 7bccd16 commit 580ca90

File tree

5 files changed

+131
-0
lines changed

5 files changed

+131
-0
lines changed

.github/workflows/build.yaml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
name: build
3+
4+
# Actions that take place everywhere
5+
# Here we build the container image but don't push it.
6+
7+
# -----------------
8+
# Control variables (GitHub Secrets)
9+
# -----------------
10+
#
11+
# (n/a)
12+
#
13+
# -----------
14+
# Environment (GitHub Environments)
15+
# -----------
16+
#
17+
# Environment (n/a)
18+
19+
on:
20+
push:
21+
22+
jobs:
23+
build:
24+
runs-on: ubuntu-latest
25+
steps:
26+
- name: Checkout
27+
uses: actions/checkout@v4
28+
- name: Set up QEMU
29+
uses: docker/setup-qemu-action@v3
30+
- name: Set up Docker Buildx
31+
uses: docker/setup-buildx-action@v3
32+
- name: Build
33+
uses: docker/build-push-action@v6
34+
with:
35+
platforms: linux/amd64,linux/arm64

Dockerfile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
ARG DEV_PYTHON="3.13.5-slim"
2+
FROM python:${DEV_PYTHON}
3+
4+
# To fix "unsupported locale"
5+
RUN apt-get update && \
6+
apt-get install -y locales && \
7+
echo 'en_GB.UTF-8 UTF-8' > /etc/locale.gen && \
8+
echo 'en_US.UTF-8 UTF-8' >> /etc/locale.gen && \
9+
locale-gen && \
10+
dpkg-reconfigure --frontend=noninteractive locales
11+
12+
ENV LANG=en_GB.UTF-8
13+
ENV LC_ALL=en_GB.UTF-8
14+
15+
# Install other stuff
16+
RUN apt-get update && \
17+
apt-get install -y --no-install-recommends \
18+
git
19+
COPY requirements.txt /tmp
20+
RUN pip install -r /tmp/requirements.txt

README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Squonk2 VS Code Python Dev Container
2+
3+
![build](https://github.com/informaticsmatters/squonk2-python-vscode-dev-container/actions/workflows/build.yaml/badge.svg?branch=3.13)
4+
5+
An evolving set of files that can be used to create a [dev-container] to satisfy
6+
our Python development with Visual Studio Code. Just put these files into
7+
your project or workspace `.devcontainer` directory and VS Code should do the rest.
8+
9+
1. `devcontainer.json`
10+
2. `Dockerfile`
11+
3. `requirements.txt`
12+
13+
The above creates an image with the following main components (amongst others): -
14+
15+
- Python (3.13 "slim")
16+
- Poetry (1.8)
17+
- Pre-Commit (4.2)
18+
- Ansible (11.8)
19+
- Docker-in-Docker
20+
21+
> Separate branches of this repository will be maintained
22+
for each active Major/Minor Python version in use. So you'll
23+
find a 3.13 branch for our Python 3.13 base container.
24+
25+
---
26+
27+
[dev-container]: https://code.visualstudio.com/docs/devcontainers/containers

devcontainer.json

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
// The AS VisualStudio Code DevContainer.
3+
// Engineered to mimic the run-time environment of the published app
4+
// but with DinD, git and poetry.
5+
//
6+
// For quick reference: https://containers.dev/implementors/json_reference/
7+
"name": "Python Docker",
8+
"build": {
9+
"dockerfile": "Dockerfile" },
10+
"features": {
11+
"ghcr.io/devcontainers/features/docker-in-docker": {}
12+
},
13+
"customizations": {
14+
"vscode": {
15+
"extensions": [
16+
"42crunch.vscode-openapi",
17+
"codezombiech.gitignore",
18+
"donjayamanne.githistory",
19+
"donjayamanne.git-extension-pack",
20+
"eamodio.gitlens",
21+
"github.vscode-github-actions",
22+
"jebbs.plantuml",
23+
"jimasp.behave-vsc",
24+
"ms-kubernetes-tools.vscode-kubernetes-tools",
25+
"ms-python.debugpy",
26+
"ms-python.pylint",
27+
"ms-python.python",
28+
"ms-python.vscode-pylance",
29+
"redhat.ansible",
30+
"redhat.vscode-yaml",
31+
"sourcery.sourcery",
32+
"streetsidesoftware.code-spell-checker",
33+
"trond-snekvik.simple-rst",
34+
"vivaxy.vscode-conventional-commits",
35+
"yzhang.markdown-all-in-one"
36+
]
37+
}
38+
}
39+
}
40+

requirements.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
pre-commit == 4.2.0
2+
ansible == 11.8.0
3+
kubernetes == 31.0.0
4+
openshift == 0.13.2
5+
botocore == 1.39.8
6+
boto3 == 1.39.8
7+
jmespath == 1.0.1
8+
poetry == 1.8.5
9+

0 commit comments

Comments
 (0)