Compare commits
30 Commits
Author | SHA1 | Date | |
---|---|---|---|
daf2491f45 | |||
64c5f8f9bb | |||
0161721372 | |||
966e0817bc | |||
8375b4f62d | |||
7071833fab | |||
c4c4301808 | |||
86704afa81 | |||
c3d1229cb2 | |||
81f8710b59 | |||
ddb2e0f08f | |||
ea303674e2 | |||
7866ffc615 | |||
e492e9777d | |||
af863edfa6 | |||
b35171735f | |||
5b628f8379 | |||
989183dbeb | |||
50fdf77b25 | |||
4bc0fe0c12 | |||
43e52f40ee | |||
82ce49ed96 | |||
219bcdf90f | |||
1f97f2f878 | |||
3008df79d6 | |||
c8c1f9a741 | |||
de644cfdc6 | |||
b1e4cb0def | |||
1d59b679a8 | |||
f503742661 |
12
.gitea/workflows/container.yaml
Normal file
12
.gitea/workflows/container.yaml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
name: Build Multiarch Container Image
|
||||||
|
on: [push]
|
||||||
|
jobs:
|
||||||
|
call-reusable-workflow:
|
||||||
|
uses: container/multiarch-build-workflow/.gitea/workflows/build.yaml@main
|
||||||
|
with:
|
||||||
|
repository: ${{ gitea.repository }}
|
||||||
|
ref_name: ${{ gitea.ref_name }}
|
||||||
|
sha: ${{ gitea.sha }}
|
||||||
|
registry_url: ${{ secrets.REGISTRY_URL }}
|
||||||
|
registry_user: ${{ secrets.REGISTRY_USER }}
|
||||||
|
registry_pw: ${{ secrets.REGISTRY_PW }}
|
@ -1,18 +0,0 @@
|
|||||||
variables:
|
|
||||||
CONTAINER_NAME: thallian/keycloak
|
|
||||||
|
|
||||||
build:
|
|
||||||
stage: build
|
|
||||||
image:
|
|
||||||
name: gcr.io/kaniko-project/executor:debug
|
|
||||||
entrypoint: [""]
|
|
||||||
script:
|
|
||||||
- mkdir -p /kaniko/.docker
|
|
||||||
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"auth\":\"$(printf "%s:%s" "$CI_REGISTRY_USER" "$CI_REGISTRY_PASSWORD" | base64 | tr -d '\n')\"}}}" > /kaniko/.docker/config.json
|
|
||||||
- >-
|
|
||||||
/kaniko/executor
|
|
||||||
--context "$CI_PROJECT_DIR"
|
|
||||||
--dockerfile "$CI_PROJECT_DIR/Dockerfile"
|
|
||||||
--destination "$CONTAINER_NAME:$CI_COMMIT_SHA"
|
|
||||||
--destination "$CONTAINER_NAME:$CI_COMMIT_REF_NAME"
|
|
||||||
--destination "$CONTAINER_NAME:latest"
|
|
@ -1,25 +1,27 @@
|
|||||||
FROM docker.io/alpine:3.15 AS builder
|
FROM docker.io/alpine:3.21 AS builder
|
||||||
|
|
||||||
ENV VERSION=18.0.2
|
ENV VERSION=26.1.0
|
||||||
ENV SHA256_SUM=c704f3bb68c28214298291b217c1658e4bb011e338b09c19f82f30b98340861a
|
ENV SHA256_SUM=10df73d2b533c241c799a1fa8e0de731db9229a71c2c06390eb3e87f54de63c7
|
||||||
|
|
||||||
RUN wget "https://github.com/keycloak/keycloak/releases/download/$VERSION/keycloak-$VERSION.tar.gz"
|
RUN wget "https://github.com/keycloak/keycloak/releases/download/$VERSION/keycloak-$VERSION.tar.gz"
|
||||||
RUN echo "$SHA256_SUM keycloak-$VERSION.tar.gz" | sha256sum -c - || exit 1
|
RUN echo "$SHA256_SUM keycloak-$VERSION.tar.gz" | sha256sum -c - || exit 1
|
||||||
RUN mkdir -p /keycloak
|
RUN mkdir -p /keycloak
|
||||||
RUN tar xvf keycloak-$VERSION.tar.gz -C /keycloak --strip 1
|
RUN tar xvf keycloak-$VERSION.tar.gz -C /keycloak --strip 1
|
||||||
|
|
||||||
FROM docker.io/thallian/alpine-s6:latest
|
FROM docker.io/thallian/alpine-s6:3.21-3.2.0.2
|
||||||
|
|
||||||
|
ENV JAVA_OPTS_APPEND="-Djava.net.preferIPv4Stack=false -Djava.net.preferIPv6Addresses=true"
|
||||||
|
|
||||||
RUN addgroup -g 2222 keycloak
|
RUN addgroup -g 2222 keycloak
|
||||||
RUN adduser -h /home/keycloak -u 2222 -D -G keycloak keycloak
|
RUN adduser -h /home/keycloak -u 2222 -D -G keycloak keycloak
|
||||||
|
|
||||||
RUN apk add --no-cache \
|
RUN apk add --no-cache \
|
||||||
openjdk17-jre-headless \
|
openjdk21-jre-headless \
|
||||||
bash
|
bash
|
||||||
|
|
||||||
COPY --from=builder --chown=keycloak:keycloak /keycloak /home/keycloak/server
|
COPY --from=builder --chown=keycloak:keycloak /keycloak /home/keycloak/server
|
||||||
|
|
||||||
RUN /home/keycloak/server/bin/kc.sh build --db postgres
|
RUN /home/keycloak/server/bin/kc.sh build --db=postgres --metrics-enabled=true
|
||||||
RUN chown -R keycloak:keycloak /home/keycloak
|
RUN chown -R keycloak:keycloak /home/keycloak
|
||||||
|
|
||||||
ADD /rootfs /
|
ADD /rootfs /
|
@ -1,10 +1,11 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
exec s6-setuidgid keycloak /home/keycloak/server/bin/kc.sh start \
|
exec s6-setuidgid keycloak /home/keycloak/server/bin/kc.sh start \
|
||||||
|
--optimized \
|
||||||
--db-url-host "$DB_HOST" \
|
--db-url-host "$DB_HOST" \
|
||||||
--db-url-database "${DB_NAME:-keycloak}" \
|
--db-url-database "${DB_NAME:-keycloak}" \
|
||||||
--db-username "${DB_USER:-keycloak}" \
|
--db-username "${DB_USER:-keycloak}" \
|
||||||
--db-password "$DB_PASSWORD" \
|
--db-password "$DB_PASSWORD" \
|
||||||
--hostname "$HOSTNAME" \
|
--hostname "$HOSTNAME" \
|
||||||
--http-enabled true \
|
--http-enabled true \
|
||||||
--proxy edge
|
--proxy-headers xforwarded
|
||||||
|
Loading…
Reference in New Issue
Block a user