Automate image building and add some images
This commit is contained in:
7
builder/Dockerfile
Normal file
7
builder/Dockerfile
Normal file
@@ -0,0 +1,7 @@
|
||||
FROM alpine:edge
|
||||
RUN apk add --no-cache go git gcc bash abuild
|
||||
RUN apk add --no-cache ko --repository=https://dl-cdn.alpinelinux.org/alpine/edge/testing
|
||||
RUN apk add --no-cache --allow-untrusted apko --repository=https://packages.wolfi.dev/os
|
||||
RUN wget -O /usr/bin/lure https://api.minio.elara.ws/adl/lure/lure-amd64 && chmod +x /usr/bin/lure
|
||||
COPY lure.toml /root/.config/lure/lure.toml
|
||||
COPY login.sh /bin/registry-login
|
||||
3
builder/README.md
Normal file
3
builder/README.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# builder
|
||||
|
||||
This is the image used to build the other images. It includes [ko](https://ko.build/), [apko](https://github.com/chainguard-dev/apko), [lure](https://lure.elara.ws), and [abuild](https://wiki.alpinelinux.org/wiki/Abuild_and_Helpers).
|
||||
11
builder/login.sh
Executable file
11
builder/login.sh
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Check if the required environment variables are set
|
||||
if [ -z "${REGISTRY}" ] || [ -z "${REGISTRY_USERNAME}" ] || [ -z "${REGISTRY_PASSWORD}" ]; then
|
||||
echo "The REGISTRY, REGISTRY_USERNAME, and REGISTRY_PASSWORD environment variables must be set."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Log in to the registry using ko. This should generate a config.json with the authentication info.
|
||||
echo "Logging in to ${REGISTRY}..."
|
||||
ko login "${REGISTRY}" -u "${REGISTRY_USERNAME}" --password-stdin <<<"${REGISTRY_PASSWORD}" || exit 2
|
||||
10
builder/lure.toml
Normal file
10
builder/lure.toml
Normal file
@@ -0,0 +1,10 @@
|
||||
rootCmd = 'sudo'
|
||||
pagerStyle = 'native'
|
||||
ignorePkgUpdates = []
|
||||
|
||||
[[repo]]
|
||||
name = 'default'
|
||||
url = 'https://github.com/Elara6331/lure-repo.git'
|
||||
|
||||
[unsafe]
|
||||
allowRunAsRoot = true
|
||||
7
builder/update-builder.sh
Executable file
7
builder/update-builder.sh
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
docker build . -t gitea.elara.ws/elara6331/builder:latest --no-cache
|
||||
docker login gitea.elara.ws
|
||||
docker push gitea.elara.ws/elara6331/builder:latest
|
||||
Reference in New Issue
Block a user