Uploading first set of base images
Some checks failed
Build and Push Dev Containers / build (push) Has been cancelled
Some checks failed
Build and Push Dev Containers / build (push) Has been cancelled
This commit is contained in:
27
.gitea/workflows/build-and-push.yml
Normal file
27
.gitea/workflows/build-and-push.yml
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
name: Build and Push Dev Containers
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: docker
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set up Docker
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
|
- name: Log in to local registry
|
||||||
|
run: echo "${{ secrets.LOCAL_REGISTRY_PASSWORD }}" | docker login ${ secrets.CONTAINER_REGISTRY } -u user --password-stdin
|
||||||
|
|
||||||
|
- name: Build and push containers
|
||||||
|
run: |
|
||||||
|
for dir in base lab python rust go nodejs; do
|
||||||
|
tag="${ secrets.CONTAINER_REGISTRY }/base-images/$dir:latest"
|
||||||
|
docker build -t "$tag" "$dir"
|
||||||
|
docker push "$tag"
|
||||||
|
done
|
8
base/Dockerfile
Normal file
8
base/Dockerfile
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
FROM alpine:latest
|
||||||
|
|
||||||
|
RUN apk add --no-cache \
|
||||||
|
bash \
|
||||||
|
curl \
|
||||||
|
helix
|
||||||
|
|
||||||
|
CMD [ "/bin/bash" ]
|
4
go/Dockerfile
Normal file
4
go/Dockerfile
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
FROM base:latest
|
||||||
|
|
||||||
|
RUN apk add --no-cache \
|
||||||
|
go
|
37
lab/Dockerfile
Normal file
37
lab/Dockerfile
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
FROM alpine:latest
|
||||||
|
|
||||||
|
# Install core utilities and development tools
|
||||||
|
RUN apk add --no-cache \
|
||||||
|
bash \
|
||||||
|
curl \
|
||||||
|
git \
|
||||||
|
jq \
|
||||||
|
helix \
|
||||||
|
openssh \
|
||||||
|
sudo \
|
||||||
|
zsh \
|
||||||
|
ca-certificates \
|
||||||
|
busybox-extras \
|
||||||
|
net-tools \
|
||||||
|
iputils \
|
||||||
|
python3 \
|
||||||
|
rust \
|
||||||
|
cargo \
|
||||||
|
go \
|
||||||
|
nodejs \
|
||||||
|
npm \
|
||||||
|
make \
|
||||||
|
build-base
|
||||||
|
|
||||||
|
# Add a non-root user
|
||||||
|
RUN adduser -D dev && echo "dev ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
|
||||||
|
RUN chsh -s /bin/zsh dev
|
||||||
|
|
||||||
|
# Set working directory
|
||||||
|
WORKDIR /home/dev
|
||||||
|
|
||||||
|
# Switch to non-root user
|
||||||
|
USER dev
|
||||||
|
|
||||||
|
# Default command
|
||||||
|
CMD ["/bin/zsh"]
|
5
nodejs/Dockerfile
Normal file
5
nodejs/Dockerfile
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
FROM base:latest
|
||||||
|
|
||||||
|
RUN apk add --no-cache \
|
||||||
|
nodejs \
|
||||||
|
pnpm
|
5
python/Dockerfile
Normal file
5
python/Dockerfile
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
FROM base:latest
|
||||||
|
|
||||||
|
RUN apk add --no-cache \
|
||||||
|
python3 \
|
||||||
|
py3-pip
|
5
rust/Dockerfile
Normal file
5
rust/Dockerfile
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
FROM base:latest
|
||||||
|
|
||||||
|
RUN apk add --no-cache \
|
||||||
|
rust \
|
||||||
|
cargo
|
Reference in New Issue
Block a user