feat: Added lab containers and improved pipeline to ensure base containers are built first
Some checks failed
Build and Push Dev Containers / build (push) Failing after 2m12s
Some checks failed
Build and Push Dev Containers / build (push) Failing after 2m12s
This commit is contained in:
@@ -24,8 +24,32 @@ jobs:
|
|||||||
|
|
||||||
- name: Build and push containers
|
- name: Build and push containers
|
||||||
run: |
|
run: |
|
||||||
for dir in $(find . -type f -iname 'Dockerfile' -exec dirname {} \; | sed 's|^\./||'); do
|
# ...existing code...
|
||||||
tag="${{ secrets.CONTAINER_REGISTRY }}/${{ secrets.CONTAINER_REGISTRY_USERNAME }}/$dir:latest"
|
set -euo pipefail
|
||||||
|
|
||||||
|
registry="${{ secrets.CONTAINER_REGISTRY }}"
|
||||||
|
username="${{ secrets.CONTAINER_REGISTRY_USERNAME }}"
|
||||||
|
|
||||||
|
# Build 'base' and 'lab' groups first (including subdirectories)
|
||||||
|
for group in base lab; do
|
||||||
|
if [ -d "$group" ]; then
|
||||||
|
echo "Processing group: $group"
|
||||||
|
find "$group" -type f -iname 'Dockerfile' -exec dirname {} \; | sed 's|^\./||' | sort -u | while read -r dir; do
|
||||||
|
tag="$registry/$username/$dir:latest"
|
||||||
|
echo "Building $dir -> $tag"
|
||||||
|
docker build -t "$tag" "$dir"
|
||||||
|
docker push "$tag"
|
||||||
|
done
|
||||||
|
else
|
||||||
|
echo "Skipping missing group: $group"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# Then build everything else (exclude base and lab)
|
||||||
|
echo "Processing remaining Dockerfiles"
|
||||||
|
find . -type f -iname 'Dockerfile' -exec dirname {} \; | sed 's|^\./||' | sort -u | grep -Ev '^(base|lab)(/|$)' | while read -r dir; do
|
||||||
|
tag="$registry/$username/$dir:latest"
|
||||||
|
echo "Building $dir -> $tag"
|
||||||
docker build -t "$tag" "$dir"
|
docker build -t "$tag" "$dir"
|
||||||
docker push "$tag"
|
docker push "$tag"
|
||||||
done
|
done
|
||||||
|
4
go-dev/Dockerfile
Normal file
4
go-dev/Dockerfile
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
FROM git.luke-else.co.uk/luke-else/lab:latest
|
||||||
|
|
||||||
|
RUN apk add --no-cache \
|
||||||
|
go
|
@@ -12,12 +12,7 @@ RUN apk add --no-cache \
|
|||||||
busybox-extras \
|
busybox-extras \
|
||||||
net-tools \
|
net-tools \
|
||||||
iputils \
|
iputils \
|
||||||
python3 \
|
|
||||||
procps \
|
procps \
|
||||||
cargo \
|
|
||||||
nodejs \
|
|
||||||
pnpm \
|
|
||||||
rust-analyzer \
|
|
||||||
make \
|
make \
|
||||||
build-base
|
build-base
|
||||||
|
|
||||||
|
5
nodejs-dev/Dockerfile
Normal file
5
nodejs-dev/Dockerfile
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
FROM git.luke-else.co.uk/luke-else/lab:latest
|
||||||
|
|
||||||
|
RUN apk add --no-cache \
|
||||||
|
nodejs \
|
||||||
|
pnpm
|
7
python-dev/Dockerfile
Normal file
7
python-dev/Dockerfile
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
FROM git.luke-else.co.uk/luke-else/lab:latest
|
||||||
|
|
||||||
|
RUN apk add --no-cache \
|
||||||
|
python3 \
|
||||||
|
py3-uv
|
||||||
|
|
||||||
|
CMD [ "uv run" ]
|
5
rust-dev/Dockerfile
Normal file
5
rust-dev/Dockerfile
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
FROM git.luke-else.co.uk/luke-else/lab:latest
|
||||||
|
|
||||||
|
RUN apk add --no-cache cargo rust-analyzer
|
||||||
|
|
||||||
|
CMD [ "cargo run --release" ]
|
Reference in New Issue
Block a user