Skip to content

Commit 42a43cc

Browse files
Added all dockers
1 parent ae7b8bb commit 42a43cc

File tree

16 files changed

+147
-98
lines changed

16 files changed

+147
-98
lines changed

.github/workflows/cicd.yaml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
#
1+
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
2+
23
name: Create and publish a Docker image
34

45
# Configures this workflow to run every time a change is pushed to the branch called `release`.
@@ -29,7 +30,7 @@ env:
2930
vendor: NHS England
3031
node_version: 24
3132
temp_dockerfile: /tmp/Dockerfile.source
32-
33+
image_prefix: nhsdigital/nhs-notify-devcontainer-
3334
# There is a single job in this workflow. It's configured to run on the latest available version of Ubuntu.
3435
jobs:
3536
deploy-nhs-notify-feature:
@@ -66,15 +67,12 @@ jobs:
6667
matrix:
6768
include:
6869
- container_name: base
69-
image: nhsdigital/nhs-notify-devcontainer-base
7070
title: NHS Notifiy Devcontainer Base Image
7171
description: Base development container for NHS Notify projects
7272
- container_name: default
73-
image: nhsdigital/nhs-notify-devcontainer-default
7473
title: NHS Notifiy Devcontainer Default Image
7574
description: Default development container for NHS Notify projects
7675
- container_name: loaded
77-
image: nhsdigital/nhs-notify-devcontainer-loaded
7876
title: NHS Notifiy Devcontainer Loaded Image
7977
description: Loaded development container for NHS Notify projects
8078

@@ -115,14 +113,14 @@ jobs:
115113
name: Build
116114
working-directory: ${{env.base_dir}}/${{ matrix.container_name }}
117115
run: |
118-
make build IMAGE_NAME=${{ env.registry }}/${{ matrix.image }} WORKSPACE_FOLDER=${{ env.workspace_folder }}
116+
make build IMAGE_NAME=${{ env.registry }}/${{ env.image_prefix }}${{ matrix.container_name }} WORKSPACE_FOLDER=${{ env.workspace_folder }}
119117
120118
- if: steps.changes.outputs.src == 'true' || startsWith(github.ref, 'refs/tags/v')
121119
name: Extract metadata (tags, labels) for Docker
122120
id: meta
123121
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
124122
with:
125-
images: ${{ env.registry }}/${{ matrix.image }}
123+
images: ${{ env.registry }}/${{ env.image_prefix }}${{ matrix.container_name }}
126124
flavor: |
127125
latest=auto
128126
tags: |
@@ -143,7 +141,7 @@ jobs:
143141
144142
- if: steps.changes.outputs.src == 'true' || startsWith(github.ref, 'refs/tags/v')
145143
name: create temp dockerfile source
146-
run: echo 'FROM ${{ env.registry }}/${{ matrix.image }}' > ${{ env.temp_dockerfile }}
144+
run: echo 'FROM ${{ env.registry }}/${{ env.image_prefix }}${{ matrix.container_name }}' > ${{ env.temp_dockerfile }}
147145

148146
- if: steps.changes.outputs.src == 'true' || startsWith(github.ref, 'refs/tags/v')
149147
name: Build and push Docker image
@@ -160,7 +158,7 @@ jobs:
160158
name: Generate artifact attestation
161159
uses: actions/attest-build-provenance@v3
162160
with:
163-
subject-name: ${{ env.registry }}/${{ matrix.image }}
161+
subject-name: ${{ env.registry }}/${{ env.image_prefix }}${{ matrix.container_name }}
164162
subject-digest: ${{ steps.push.outputs.digest }}
165163
push-to-registry: false
166164

.tool-versions

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
nodejs 22.11.0
2+
jq 1.6

src/.tool-versions

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
nodejs 22.11.0
1+
nodejs 22.11.0
2+
jq 1.6

src/devcontainers/Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
build_no_cache:
2+
cd base && make build_no_cache
3+
cd default && make build_no_cache
4+
cd loaded && make build_no_cache
Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,5 @@
11
FROM mcr.microsoft.com/devcontainers/base:ubuntu-24.04
2-
LABEL org.opencontainers.image.source=https://github.com/NHSDigital/nhs-notify-devcontainers/tree/main/src/devcontainers/base
3-
LABEL org.opencontainers.image.url=https://github.com/NHSDigital/nhs-notify-devcontainers/blob/main/src/devcontainers/base/README.md
4-
LABEL org.opencontainers.image.description="Base Dev Container for NHS Digital Notify development environments"
5-
LABEL org.opencontainers.image.vendor="NHS England"
6-
LABEL org.opencontainers.image.licenses=MIT
7-
LABEL org.opencontainers.image.title="NHS Digital Notify Base Dev Container"
8-
LABEL org.opencontainers.image.description="Base Dev Container for NHS Digital Notify development environments"
92

10-
11-
COPY scripts /usr/local/share/nhsnotify-base
12-
13-
WORKDIR /usr/local/share/nhsnotify-base
3+
COPY scripts /usr/local/share/nhsnotify/base
4+
WORKDIR /usr/local/share/nhsnotify/base
145
RUN ./install.sh

src/devcontainers/base/.devcontainer/devcontainer.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
{
2-
3-
"name": "NHS Notify Default Base Developer Container",
2+
"name": "nhs-notify-devcontainer-base",
43
"postCreateCommand": "echo Base Created",
54
"postStartCommand": "echo Base Started",
6-
"build": {
5+
"build": {
76
"dockerfile": "Dockerfile"
87
},
98
"runArgs": [

src/devcontainers/base/Makefile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,13 @@ build:
99
--workspace-folder $(WORKSPACE_FOLDER) \
1010
--image-name "$(IMAGE_NAME)" \
1111
--label "devcontainer.metadata=[{\"containerEnv\": { \"NOTIFY_USE_BASE\": \"true\" }}]"
12+
13+
build_no_cache:
14+
npm install -g @devcontainers/cli && \
15+
BUILDKIT_PROGRESS=plain \
16+
devcontainer build \
17+
--push false \
18+
--workspace-folder $(WORKSPACE_FOLDER) \
19+
--image-name "$(IMAGE_NAME)" \
20+
--no-cache \
21+
--label "devcontainer.metadata=[{\"containerEnv\": { \"NOTIFY_USE_BASE\": \"true\" }}]"
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
FROM ghcr.io/nhsdigital/nhs-notify-devcontainer-base:latest
2+
3+
COPY scripts /usr/local/share/nhsnotify/default
4+
WORKDIR /usr/local/share/nhsnotify/default
5+
RUN ./install.sh

src/devcontainers/default/.devcontainer/devcontainer.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
{
2-
"name": "NHS Notify Default Developer Container",
3-
"image": "ghcr.io/nhsdigital/nhs-notify-devcontainer-base:latest",
2+
"name": "nhs-notify-devcontainer-default",
3+
"build": {
4+
"dockerfile": "Dockerfile"
5+
},
46
"postCreateCommand": "echo Default Created",
57
"postStartCommand": "echo Default Started",
68
"runArgs": [
79
"--platform=linux/amd64"
8-
],
9-
"features": {
10+
]
11+
, "features": {
1012
"ghcr.io/devcontainers/features/python:1.7.1": {
1113
"version": "3.13.8",
1214
"installTools": true
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/bash
2+
3+
echo "Starting NHS Notify default container installation script"
4+
5+
echo "Finished NHS Notify default container installation script"

0 commit comments

Comments
 (0)