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
|
||||
run: |
|
||||
for dir in $(find . -type f -iname 'Dockerfile' -exec dirname {} \; | sed 's|^\./||'); do
|
||||
tag="${{ secrets.CONTAINER_REGISTRY }}/${{ secrets.CONTAINER_REGISTRY_USERNAME }}/$dir:latest"
|
||||
# ...existing code...
|
||||
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 push "$tag"
|
||||
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 \
|
||||
net-tools \
|
||||
iputils \
|
||||
python3 \
|
||||
procps \
|
||||
cargo \
|
||||
nodejs \
|
||||
pnpm \
|
||||
rust-analyzer \
|
||||
make \
|
||||
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