Skip to content

Commit 7b06614

Browse files
author
Alan Christie
committed
dev: Better dev-container
1 parent 58375ce commit 7b06614

File tree

4 files changed

+26
-5
lines changed

4 files changed

+26
-5
lines changed

.devcontainer/Dockerfile

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
FROM mcr.microsoft.com/devcontainers/python:1-3.13-bullseye
22

3-
# The platform (CPU architectire)
4-
# if not provided by a build-arg we take a defult (ARM)
3+
# The platform (CPU architecture)
4+
# if not provided by a build-arg we take a default (ARM)
55
ARG PLATFORM=amd64
66
ENV PLATFORM=$PLATFORM
77

8-
# kubectl
8+
# Install our main Python requirements
9+
# and kubectl
910
ARG KUBECTL_VERSION=1.32.8
10-
RUN curl -LO "https://dl.k8s.io/release/v${KUBECTL_VERSION}/bin/linux/${PLATFORM}/kubectl" \
11+
COPY requirements.txt /tmp
12+
RUN pip install -r /tmp/requirements.txt \
13+
&& rm /tmp/requirements.txt \
14+
&& curl -LO "https://dl.k8s.io/release/v${KUBECTL_VERSION}/bin/linux/${PLATFORM}/kubectl" \
1115
&& install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl

.devcontainer/devcontainer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,11 @@
2828
// (see https://code.visualstudio.com/remote/advancedcontainers/persist-bash-history)
2929
//
3030
// The user will also need a ~/k8s-config directory (kubernetes config files)
31+
// as well as a ~/.kube directory
3132
"mounts": [
3233
"source=${localEnv:HOME}/.gitconfig,target=/home/vscode/.gitconfig,type=bind,consistency=cached",
3334
"source=${localEnv:HOME}/k8s-config,target=/k8s-config,type=bind,consistency=cached",
35+
"source=${localEnv:HOME}/.kube,target=/home/vscode/.kube,type=bind,consistency=cached",
3436
"source=projectname-bashhistory,target=/commandhistory,type=volume"
3537
],
3638
"customizations": {
@@ -52,7 +54,6 @@
5254
}
5355
},
5456
"postCreateCommand": {
55-
"Install Python requirements": "pip3 install --user -r requirements.txt",
5657
"Install Pre-Commit": "pre-commit install -t commit-msg -t pre-commit",
5758
"Fix Volume Permissions": "sudo chown -R $(whoami): /commandhistory"
5859
},

pyproject.toml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,19 @@ kubernetes = "^31.0.0"
3636
[build-system]
3737
requires = ["poetry-core"]
3838
build-backend = "poetry.core.masonry.api"
39+
40+
[tool.commitizen]
41+
name = "cz_customize"
42+
version_provider = "pep621"
43+
prerelease_offset = 1
44+
45+
[tool.commitizen.customize]
46+
schema_pattern = "(build|bump|chore|ci|dev|docs|feat|fix|perf|refactor|remove|style|test):(\\s.*)"
47+
commit_parser = "^(?P<change_type>build|bump|chore|ci|dev|docs|feat|fix|perf|refactor|remove|style|test):\\s(?P<message>.*)?"
48+
# By excluding 'bump', 'ci', 'dev', and 'docs' from
49+
# 'change_type_map', 'change_type_order' and 'changelog_pattern'
50+
# we omit the corresponding commit comments from the CHANGELOG.
51+
# The order of types in the CHANGELOG is dictated by the type_order
52+
change_type_map = {"feat" = "New Features", "fix" = "Bug Fixes", "perf" = "Performance Improvements", "refactor" = "Refactoring", "chore" = "General Improvements", "remove" = "Removed", "style" = "Stylistic Changes", "test" = "Testing", "build" = "Build"}
53+
change_type_order = ["BREAKING CHANGE", "New Features", "Bug Fixes", "Performance Improvements", "Refactoring", "General Improvements", "Removed", "Stylistic Changes", "Testing", "Build"]
54+
changelog_pattern = "^(build|chore|feat|fix|perf|refactor|remove|style|test)"

0 commit comments

Comments
 (0)