Skip to content

Commit a527baf

Browse files
committed
feat: init ubi8-minimal image
0 parents  commit a527baf

File tree

7 files changed

+204
-0
lines changed

7 files changed

+204
-0
lines changed

.dockerignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.github/
2+
README.md

.github/dependabot.yml

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
2+
version: 2
3+
updates:
4+
- package-ecosystem: "docker"
5+
directory: "/"
6+
schedule:
7+
interval: "daily"
8+
commit-message:
9+
prefix: "feat: "
10+
- package-ecosystem: "github-actions"
11+
directory: "/"
12+
schedule:
13+
interval: "daily"
14+
commit-message:
15+
prefix: "chore(ci): "
16+
open-pull-requests-limit: 10

.github/workflow/release.yaml

+69
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: Publish Container Images
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*.*.*'
7+
pull_request:
8+
9+
jobs:
10+
docker:
11+
runs-on: ubuntu-latest
12+
steps:
13+
-
14+
name: Checkout
15+
uses: actions/[email protected]
16+
17+
- name: Prepare Image Metadata
18+
id: meta
19+
uses: docker/metadata-action@v3
20+
with:
21+
images: |
22+
ghcr.io/radiorabe/ubi8-minimal
23+
tags: |
24+
type=schedule
25+
type=ref,event=branch
26+
type=ref,event=pr
27+
type=semver,pattern={{version}}
28+
type=semver,pattern={{major}}.{{minor}}
29+
type=semver,pattern={{major}}
30+
type=sha
31+
32+
- name: Set up QEMU
33+
uses: docker/setup-qemu-action@v1
34+
35+
- name: Set up Docker Buildx
36+
uses: docker/setup-buildx-action@v1
37+
38+
- name: Login to GitHub Container Registry
39+
uses: docker/login-action@v1
40+
if: github.event_name != 'pull_request'
41+
with:
42+
registry: ghcr.io
43+
username: ${{ github.actor }}
44+
password: ${{ secrets.GITHUB_TOKEN }}
45+
46+
- name: Build and push
47+
id: docker_build
48+
uses: docker/build-push-action@v2
49+
with:
50+
context: .
51+
file: ./Dockerfile
52+
platforms: linux/amd64
53+
push: ${{ github.event_name != 'pull_request' }}
54+
tags: ${{ steps.meta.outputs.tags }}
55+
labels: |
56+
name="ubi8-minimal"
57+
version=${{ steps.meta.outputs.version }}
58+
com.redhat.component="rabe-ubi8-minimal-container"
59+
io.k8s.display-name="RaBe Universal Base Image 8 Minimal"
60+
io.openshift.expose-services=""
61+
io.openshift.tags="minimal rhel8 rabe"
62+
org.opencontainers.image.title=${{ github.event.repository.name }}
63+
org.opencontainers.image.description=${{ github.event.repository.description }}
64+
org.opencontainers.image.url=${{ github.event.repository.html_url }}
65+
org.opencontainers.image.source=${{ github.event.repository.html_url }}
66+
org.opencontainers.image.version=${{ steps.meta.outputs.version }}
67+
org.opencontainers.image.created=${{ steps.meta.outputs.created }}
68+
org.opencontainers.image.revision=${{ github.sha }}
69+
org.opencontainers.image.licenses=${{ github.event.repository.license.spdx_id }}
+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Run semantic-release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- master
8+
- develop
9+
10+
jobs:
11+
semantic-release:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout
15+
uses: actions/[email protected]
16+
with:
17+
fetch-depth: 0
18+
19+
- name: Run go-semantic-release
20+
id: semrel
21+
uses: go-semantic-release/action@v1
22+
with:
23+
github-token: ${{ secrets.RABE_ITREAKTION_GITHUB_TOKEN }}
24+
allow-initial-development-versions: true

Dockerfile

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.5-218
2+
3+
LABEL maintainer="Radio Bern RaBe"
4+
5+
# Add RaBe CA trust anchor
6+
COPY rabe/rabe-ca.crt /etc/pki/ca-trust/source/anchors/
7+
RUN update-ca-trust extract

README.md

+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# RaBe Universal Base Image 8 Minimal
2+
3+
The RaBe Universal Base Image 8 Minimal is a stripped down image that uses microdnf as a package.
4+
5+
The image is based on the [Red Hat Universal Base Image 8 Minimal](https://catalog.redhat.com/software/containers/ubi8/ubi-minimal/)
6+
container provided by Red Hat.
7+
8+
## Features
9+
10+
- Based on UBI8 minimal
11+
- Uses microdnf as a package manager
12+
- Establishes Trust with the RaBe Root CA
13+
14+
## Usage
15+
16+
Create a downstream image from this image:
17+
18+
```Dockerfile
19+
FROM ghcr.io/radiorabe/ubi8-minimal:latest
20+
21+
RUN microdnf install -y cowsay \
22+
&& microdnf clean all
23+
```
24+
25+
## Release Management
26+
27+
The CI/CD setup uses semantic commit messages following the [conventional commits standard](https://www.conventionalcommits.org/en/v1.0.0/).
28+
There is a GitHub Action in [.github/workflows/semantic-release.yaml](./.github/workflows/semantic-release.yaml)
29+
that uses [go-semantic-commit](https://go-semantic-release.xyz/) to create new
30+
releases.
31+
32+
The commit message should be structured as follows:
33+
34+
```
35+
<type>[optional scope]: <description>
36+
37+
[optional body]
38+
39+
[optional footer(s)]
40+
```
41+
42+
The commit contains the following structural elements, to communicate intent to the consumers of your library:
43+
44+
1. **fix:** a commit of the type `fix` patches gets released with a PATCH version bump
45+
1. **feat:** a commit of the type `feat` gets released as a MINOR version bump
46+
1. **BREAKING CHANGE:** a commit that has a footer `BREAKING CHANGE:` gets released as a MAJOR version bump
47+
1. types other than `fix:` and `feat:` are allowed and don't trigger a release
48+
49+
If a commit does not contain a conventional commit style message you can fix
50+
it during the squash and merge operation on the PR.
51+
52+
## Build Process
53+
54+
The CI/CD setup uses the [Docker build-push Action](https://github.com/docker/build-push-action) to publish ocntainer images. This is managed in [.github/workflows/release.yaml](./.github/workflows/release.yaml).
55+
56+
## License
57+
58+
This application is free software: you can redistribute it and/or modify it under
59+
the terms of the GNU Affero General Public License as published by the Free
60+
Software Foundation, version 3 of the License.
61+
62+
## Copyright
63+
64+
Copyright (c) 2022 [Radio Bern RaBe](http://www.rabe.ch)

rabe/rabe-ca.crt

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
-----B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