Skip to content

Commit 2249054

Browse files
committed
feat: add docs flavor
1 parent 6ade42b commit 2249054

20 files changed

Lines changed: 506 additions & 16 deletions
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"image": "ghcr.io/philips-software/amp-devcontainer-docs:${localEnv:IMAGE_VERSION}",
3+
"workspaceFolder": "/workspaces/amp-devcontainer/test/docs/workspace"
4+
}

.devcontainer/docs/Dockerfile

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# syntax=docker/dockerfile:1
2+
3+
ARG BASE_IMAGE=ghcr.io/philips-software/amp-devcontainer-base:edge
4+
FROM ${BASE_IMAGE}
5+
6+
ARG DEBIAN_FRONTEND=noninteractive
7+
8+
HEALTHCHECK NONE
9+
10+
SHELL ["/bin/bash", "-Eeuo", "pipefail", "-c"]
11+
12+
# Set default environment options
13+
ENV PYTHONPYCACHEPREFIX=/cache/.python
14+
15+
# Install the base system with all tool dependencies
16+
RUN --mount=type=bind,source=.devcontainer/docs/apt-requirements.json,target=/tmp/apt-requirements.json \
17+
--mount=type=bind,source=.devcontainer/docs/requirements.txt,target=/tmp/requirements.txt \
18+
--mount=type=cache,target=/cache,sharing=locked \
19+
--mount=type=cache,target=/var/cache/apt,sharing=locked \
20+
--mount=type=cache,target=/var/lib/apt,sharing=locked \
21+
--mount=type=cache,target=/var/log,sharing=locked <<EOF
22+
23+
# Install the base system with all tool dependencies
24+
apt-get update && jq -r 'to_entries | .[] | .key + "=" + .value' /tmp/apt-requirements.json | \
25+
xargs apt-get install -y --no-install-recommends
26+
27+
# Install some tools via pip to get more recent versions, clean up afterwards
28+
python3 -m pip install --break-system-packages --require-hashes --no-cache-dir --no-compile -r /tmp/requirements.txt
29+
find / -regex '^.*\(__pycache__\|\.py[co]\)$' -delete
30+
rm -rf "$(pip cache dir)"
31+
32+
# Update python alternative to the correct version
33+
update-alternatives --install /usr/bin/python python /usr/bin/python3 10
34+
EOF
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"graphviz": "14.1.2-1ubuntu1",
3+
"plantuml": "1:1.2020.2+ds-6build1",
4+
"python3-pip": "25.1.1+dfsg-1ubuntu2"
5+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"remoteEnv": {
3+
"LOCAL_WORKSPACE_FOLDER": "${localWorkspaceFolder}"
4+
},
5+
"customizations": {
6+
"vscode": {
7+
"extensions": [
8+
"jebbs.plantuml@2.18.1",
9+
"mhutchie.git-graph@1.30.0",
10+
"ms-vsliveshare.vsliveshare@1.1.122",
11+
"sbdl.sbdl@1.8.18",
12+
"usernamehw.errorlens@3.28.0"
13+
]
14+
}
15+
}
16+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"initializeCommand": "docker build -f .devcontainer/base/Dockerfile -t amp-devcontainer-base:local .",
3+
"build": {
4+
"dockerfile": "Dockerfile",
5+
"context": "../..",
6+
"args": {
7+
"BASE_IMAGE": "amp-devcontainer-base:local"
8+
}
9+
},
10+
"remoteEnv": {
11+
"CONTAINER_FLAVOR": "docs"
12+
},
13+
"customizations": {
14+
"vscode": {
15+
"settings": {
16+
"files.insertFinalNewline": true,
17+
"files.trimTrailingWhitespace": true
18+
},
19+
"extensions": [
20+
"github.copilot@1.388.0",
21+
"github.vscode-github-actions@0.32.1",
22+
"github.vscode-pull-request-github@0.152.0",
23+
"jetmartin.bats@0.1.10",
24+
"kherring.bats-test-runner@0.1.3",
25+
"mhutchie.git-graph@1.30.0",
26+
"ms-azuretools.vscode-docker@2.0.0",
27+
"usernamehw.errorlens@3.28.0"
28+
]
29+
}
30+
}
31+
}

.devcontainer/docs/requirements.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
sbdl==1.22.7

.devcontainer/docs/requirements.txt

Lines changed: 293 additions & 0 deletions
Large diffs are not rendered by default.

.github/RELEASE_TEMPLATE.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@
88

99
#### :bookmark: Packages
1010

11-
| Container | Full identifier |
12-
|-----------------------|--------------------------------------------------------------------------------------------------------------------|
13-
| amp-devcontainer-base | ghcr.io/philips-software/amp-devcontainer-base:{{ amp-devcontainer-base-version }}@{{ amp-devcontainer-base-sha }} |
14-
| amp-devcontainer-cpp | ghcr.io/philips-software/amp-devcontainer-cpp:{{ amp-devcontainer-cpp-version }}@{{ amp-devcontainer-cpp-sha }} |
15-
| amp-devcontainer-rust | ghcr.io/philips-software/amp-devcontainer-rust:{{ amp-devcontainer-rust-version }}@{{ amp-devcontainer-rust-sha }} |
11+
| Container | Full identifier |
12+
|--------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------|
13+
| amp-devcontainer-base | ghcr.io/philips-software/amp-devcontainer-base:{{ amp-devcontainer-base-version }}@{{ amp-devcontainer-base-sha }} |
14+
| amp-devcontainer-cpp | ghcr.io/philips-software/amp-devcontainer-cpp:{{ amp-devcontainer-cpp-version }}@{{ amp-devcontainer-cpp-sha }} |
15+
| amp-devcontainer-docs | ghcr.io/philips-software/amp-devcontainer-docs:{{ amp-devcontainer-docs-version }}@{{ amp-devcontainer-docs-sha }} |
16+
| amp-devcontainer-rust | ghcr.io/philips-software/amp-devcontainer-rust:{{ amp-devcontainer-rust-version }}@{{ amp-devcontainer-rust-sha }} |
1617

.github/dependabot.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ updates:
2121
directories:
2222
- .devcontainer/base
2323
- .devcontainer/cpp
24+
- .devcontainer/docs
2425
- .devcontainer/rust
2526
schedule:
2627
interval: weekly

.github/workflows/build-push-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
needs: build-push-test-base
4040
strategy:
4141
matrix:
42-
flavor: [cpp, rust]
42+
flavor: [cpp, docs, rust]
4343
uses: ./.github/workflows/wc-build-push-test.yml
4444
secrets:
4545
TEST_GITHUB_TOKEN: ${{ secrets.TEST_GITHUB_TOKEN }}

0 commit comments

Comments
 (0)