Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .devcontainer/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*
!Dockerfile
!install-pwsh-linux.sh
!ubuntu/Dockerfile
!arch/Dockerfile
51 changes: 51 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
FROM docker.io/library/node:24-trixie-slim@sha256:50c3b2f6988dfc307b86e5301d69611af31f4789bdf232863b07d3b02fe55ae0 AS node
FROM ghcr.io/astral-sh/uv:latest@sha256:2bb3ebca0a796a155094a27773d290c4b074572e6107f171d88d086682fd2500 AS uv
FROM ghcr.io/astral-sh/ruff:latest@sha256:77e0110c04fdfdd7c97657a680aad0faa7c7d2161556d698695e87d608071ac2 AS ruff
FROM docker.io/rhysd/actionlint:latest@sha256:b1934ee5f1c509618f2508e6eb47ee0d3520686341fec936f3b79331f9315667 AS actionlint
FROM docker.io/hadolint/hadolint:latest@sha256:32dac94127fd60b7b7e3fbfc65e1383b9b5e25c9bfd7b8536de7a539fe68a12d AS hadolint

FROM mcr.microsoft.com/devcontainers/base:trixie@sha256:b8c3669fb4cc652621b3386517c40ab3e151e827de958d6fe75528798ffb5727

# Distribution packages provide native tools used by this repository.
# hadolint ignore=DL3008
RUN apt-get update && apt-get install -y --no-install-recommends \
bash \
bash-completion \
build-essential \
ca-certificates \
curl \
diffutils \
file \
findutils \
gawk \
git \
jq \
less \
locales \
openssh-client \
pkg-config \
procps \
python3 \
python3-pip \
python3-venv \
ripgrep \
shellcheck \
sudo \
tar \
unzip \
wget \
xz-utils \
zip \
&& rm -rf /var/lib/apt/lists/*

COPY --from=node /usr/local/ /usr/local/
COPY --from=uv /uv /uvx /usr/local/bin/
COPY --from=ruff /ruff /usr/local/bin/ruff
COPY --from=actionlint /usr/local/bin/actionlint /usr/local/bin/actionlint
COPY --from=hadolint /bin/hadolint /usr/local/bin/hadolint

RUN npm install --global corepack@0.36.0 markdownlint-cli2@0.23.2 \
&& corepack enable \
&& UV_TOOL_DIR=/opt/uv-tools UV_TOOL_BIN_DIR=/usr/local/bin uv tool install zizmor==1.30.0
ENV LANG=C.UTF-8 LC_ALL=C.UTF-8 COREPACK_ENABLE_DOWNLOAD_PROMPT=0
WORKDIR /workspace
29 changes: 29 additions & 0 deletions .devcontainer/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# k1-max-config-backup devcontainer

Open this repository in VS Code and run **Dev Containers: Reopen in
Container**. A local Docker-compatible engine and the Dev Containers extension
are required. The first build downloads the pinned tool images and distribution
packages. Setup installs dependencies from this checkout's lockfiles and runs
`smoke.sh`. Rebuild the container after Dockerfile changes. Rerun
`bash .devcontainer/post-create.sh` after changing dependency lockfiles.

Includes Python, Ruff, ShellCheck, actionlint, zizmor and Markdown tooling for
repository maintenance. This repository has no application runtime to start.

Run from the workspace root:

```sh
bash scripts/check-development.sh
```

The editor runs as `vscode`, with its UID adjusted for the local workspace. The
source is bind-mounted at `/workspace` and is never copied into image layers.
Use a regular clone when the container cannot see a linked worktree's external
Git directory. Keep credentials in your local development environment.

`bash .devcontainer/smoke.sh` checks installed tools and checkout access. It
does not run the application test suite. No application starts automatically.
Image references include immutable digests. Dependabot monitors the Dockerfiles
where supported. Distribution packages resolve from the configured Debian
repositories at build time. Update image pins and rerun setup and native checks
together. Existing native and Nix workflows remain available independently.
39 changes: 39 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"name": "k1-max-config-backup development",
"build": {
"dockerfile": "Dockerfile",
"context": "."
},
"workspaceMount": "source=${localWorkspaceFolder},target=/workspace,type=bind",
"workspaceFolder": "/workspace",
"remoteUser": "vscode",
"updateRemoteUserUID": true,
"init": true,
"postCreateCommand": [
"bash",
".devcontainer/post-create.sh"
],
"waitFor": "postCreateCommand",
"customizations": {
"vscode": {
"extensions": [
"editorconfig.editorconfig",
"timonwong.shellcheck",
"ms-python.python",
"charliermarsh.ruff",
"redhat.vscode-yaml",
"github.vscode-github-actions"
],
"settings": {
"terminal.integrated.defaultProfile.linux": "bash",
"terminal.integrated.profiles.linux": {
"bash": {
"path": "/bin/bash"
}
},
"python.defaultInterpreterPath": "/usr/bin/python3",
"files.eol": "\n"
}
}
}
}
5 changes: 5 additions & 0 deletions .devcontainer/post-create.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash
# Install checkout dependencies without starting application or host services.
set -euo pipefail
cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.."
bash .devcontainer/smoke.sh
11 changes: 11 additions & 0 deletions .devcontainer/smoke.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env bash
# Fail setup when the tools or mounted checkout are unavailable.
set -euo pipefail
cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.."
test -w .
git rev-parse --show-toplevel >/dev/null
for tool in git bash python3 node shellcheck ruff actionlint hadolint zizmor; do
command -v "${tool}" >/dev/null || { echo "Missing development tool: ${tool}" >&2; exit 1; }
done
node -e 'if (Number(process.versions.node.split(".")[0]) !== 24) process.exit(1)'
printf "%s\n" "Development tools ready. See .devcontainer/README.md for repository checks."
12 changes: 12 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: 2
updates:

- package-ecosystem: docker
directory: /.devcontainer
cooldown:
default-days: 7
schedule:
interval: weekly
open-pull-requests-limit: 3
commit-message:
prefix: chore(deps)
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,8 @@ See [development environments](docs/development-environments.md) for locked repo

See [third-party notices](THIRD_PARTY_NOTICES.md) for the project license scope,
retained upstream notices, and dependency or asset exceptions.

## Devcontainer

See [the devcontainer guide](.devcontainer/README.md) for the repository toolchain,
setup, checks and platform limits.