Add alpine base images
All checks were successful
/ build (push) Successful in 6m17s

This commit is contained in:
Alexander Schäferdiek 2024-12-13 09:02:31 +01:00
parent e00f368e8b
commit 37b5850c91
GPG key ID: 305D8469B16F9241
8 changed files with 88 additions and 22 deletions

View file

@ -32,18 +32,42 @@ jobs:
username: ${{ secrets.FORGEJO_USER }} username: ${{ secrets.FORGEJO_USER }}
password: ${{ secrets.FORGEJO_TOKEN }} password: ${{ secrets.FORGEJO_TOKEN }}
- name: Build docker image - base - name: Build - executor-ubuntu
uses: docker/build-push-action@v4 uses: docker/build-push-action@v4
with: with:
file: Dockerfile file: Dockerfile-ubuntu
push: true push: true
tags: | tags: |
git.myservermanager.com/msm/forgejo-base-executor-image:latest git.myservermanager.com/msm/executor-ubuntu:latest
- name: Build docker image - make cgo - name: Build - executor-ubuntu-build-essential
uses: docker/build-push-action@v4 uses: docker/build-push-action@v4
with: with:
file: Dockerfile-make-cgo file: Dockerfile-ubuntu-build-essential
push: true push: true
tags: | tags: |
git.myservermanager.com/msm/forgejo-base-executor-image-make-cgo:latest git.myservermanager.com/msm/executor-ubuntu-build-essential:latest
- name: Build - executor-ubuntu-ruby
uses: docker/build-push-action@v4
with:
file: Dockerfile-ubuntu-ruby
push: true
tags: |
git.myservermanager.com/msm/executor-ubuntu-ruby:latest
- name: Build - executor-alpine
uses: docker/build-push-action@v4
with:
file: Dockerfile-alpine
push: true
tags: |
git.myservermanager.com/msm/executor-alpine:latest
- name: Build - executor-alpine-java21
uses: docker/build-push-action@v4
with:
file: Dockerfile-alpine-java21
push: true
tags: |
git.myservermanager.com/msm/executor-alpine-java21:latest

View file

@ -31,18 +31,42 @@ jobs:
username: ${{ secrets.FORGEJO_USER }} username: ${{ secrets.FORGEJO_USER }}
password: ${{ secrets.FORGEJO_TOKEN }} password: ${{ secrets.FORGEJO_TOKEN }}
- name: Build docker image - base - name: Build - executor-ubuntu
uses: docker/build-push-action@v4 uses: docker/build-push-action@v4
with: with:
file: Dockerfile file: Dockerfile-ubuntu
push: true push: true
tags: | tags: |
git.myservermanager.com/msm/forgejo-base-executor-image:latest git.myservermanager.com/msm/executor-ubuntu:latest
- name: Build docker image - make cgo - name: Build - executor-ubuntu-build-essential
uses: docker/build-push-action@v4 uses: docker/build-push-action@v4
with: with:
file: Dockerfile-make-cgo file: Dockerfile-ubuntu-build-essential
push: true push: true
tags: | tags: |
git.myservermanager.com/msm/forgejo-base-executor-image-make-cgo:latest git.myservermanager.com/msm/executor-ubuntu-build-essential:latest
- name: Build - executor-ubuntu-ruby
uses: docker/build-push-action@v4
with:
file: Dockerfile-ubuntu-ruby
push: true
tags: |
git.myservermanager.com/msm/executor-ubuntu-ruby:latest
- name: Build - executor-alpine
uses: docker/build-push-action@v4
with:
file: Dockerfile-alpine
push: true
tags: |
git.myservermanager.com/msm/executor-alpine:latest
- name: Build - executor-alpine-java21
uses: docker/build-push-action@v4
with:
file: Dockerfile-alpine-java21
push: true
tags: |
git.myservermanager.com/msm/executor-alpine-java21:latest

6
Dockerfile-alpine Normal file
View file

@ -0,0 +1,6 @@
FROM alpine:3.20
LABEL maintainer="msm <hostmaster@myservermanager.com>"
RUN <<EOF
apk add nodejs npm git docker docker-cli-buildx
EOF

6
Dockerfile-alpine-java21 Normal file
View file

@ -0,0 +1,6 @@
FROM git.myservermanager.com/msm/executor-alpine
LABEL maintainer="msm <hostmaster@myservermanager.com>"
RUN <<EOF
apk add openjdk21 unzip
EOF

View file

@ -1,8 +1,6 @@
FROM ubuntu:24.04 FROM ubuntu:24.04
LABEL maintainer="msm <hostmaster@myservermanager.com>" LABEL maintainer="msm <hostmaster@myservermanager.com>"
# base line required by Forgejo Runner: nodejs, npm, git
# added: docker and buildx
RUN <<EOF RUN <<EOF
apt-get update apt-get update
apt-get install -y --no-install-recommends curl wget bash apt-transport-https ca-certificates gnupg nodejs npm git zstd apt-get install -y --no-install-recommends curl wget bash apt-transport-https ca-certificates gnupg nodejs npm git zstd

View file

@ -1,6 +1,5 @@
FROM git.myservermanager.com/msm/forgejo-base-executor-image FROM git.myservermanager.com/msm/executor-ubuntu
# added: make and clang for CGO compile
RUN <<EOF RUN <<EOF
apt-get update apt-get update
apt-get install -y --no-install-recommends build-essential make clang apt-get install -y --no-install-recommends build-essential make clang

7
Dockerfile-ubuntu-ruby Normal file
View file

@ -0,0 +1,7 @@
FROM git.myservermanager.com/msm/executor-ubuntu
RUN <<EOF
apt-get update
apt-get install -y --no-install-recommends ruby ruby-dev rsync openssh-client
rm -rf /var/lib/apt/lists/\* /tmp/\* /var/tmp/*
EOF

View file

@ -6,15 +6,17 @@ This git repository provides docker base images which can be used inside Forgejo
All published images All published images
* are based on Ubuntu 24 LTS
* inherit from the main base image, so they also include its packages * inherit from the main base image, so they also include its packages
* are re-published monthly * are re-published monthly
* are published under the `git.myservermanager.com/msm/` space and _not_ in Docker Hub * are published under the `git.myservermanager.com/msm/` space and _not_ in Docker Hub
| Image name | Packages | | Base | Image name | Packages |
| :------------------------------------- | --------------------------------------: | | :----------- | :-------------------------------- | -----------------------------------------: |
| `forgejo-base-executor-image` | `nodejs` `npm` `docker` `docker-buildx` | | Ubuntu 24.04 | `executor-ubuntu` | `nodejs` `npm` `docker` `docker-buildx` |
| `forgejo-base-executor-image-make-cgo` | `build-essential` `make` `clang` | | Ubuntu 24.04 | `executor-ubuntu-build-essential` | `build-essential` `make` `clang` |
| Ubuntu 24.04 | `executor-ubuntu-ruby` | `ruby` `ruby-dev` `rsync` `openssh-client` |
| Alpine 3.20 | `executor-alpine` | `nodejs` `npm` `docker` `docker-buildx` |
| Alpine 3.20 | `executor-alpine-java21` | `openjdk21` `unzip` |
### Usage ### Usage
@ -23,7 +25,7 @@ jobs:
build: build:
runs-on: docker runs-on: docker
container: container:
image: git.myservermanager.com/msm/forgejo-base-executor-image-make-cgo image: git.myservermanager.com/msm/executor-ubuntu-build-essential
steps: steps:
- name: Test - name: Test
run: | run: |