Use own Containerfile for traefik-forward-auth
This commit is contained in:
parent
69108d154a
commit
747b041721
3 changed files with 15 additions and 7 deletions
|
@ -4,7 +4,7 @@ on:
|
||||||
- containers/keycloak/*
|
- containers/keycloak/*
|
||||||
- .forgejo/workflows/build-keycloak.yaml
|
- .forgejo/workflows/build-keycloak.yaml
|
||||||
jobs:
|
jobs:
|
||||||
build-synapse:
|
build-keycloak:
|
||||||
runs-on: docker
|
runs-on: docker
|
||||||
container:
|
container:
|
||||||
image: library/docker:dind
|
image: library/docker:dind
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
paths:
|
paths:
|
||||||
|
- containers/traefik-forward-auth/*
|
||||||
- .forgejo/workflows/build-traefik-forward-auth.yaml
|
- .forgejo/workflows/build-traefik-forward-auth.yaml
|
||||||
env:
|
|
||||||
VERSION: v2.3.0
|
|
||||||
jobs:
|
jobs:
|
||||||
build-traefik-forward-auth:
|
build-traefik-forward-auth:
|
||||||
runs-on: docker
|
runs-on: docker
|
||||||
|
@ -11,14 +10,13 @@ jobs:
|
||||||
image: library/docker:dind
|
image: library/docker:dind
|
||||||
steps:
|
steps:
|
||||||
- run: apk add --no-cache nodejs git
|
- run: apk add --no-cache nodejs git
|
||||||
- name: checkout traefik-forward-auth
|
|
||||||
run: git clone -b ${VERSION} https://github.com/thomseddon/traefik-forward-auth
|
|
||||||
- name: login to container registry
|
- name: login to container registry
|
||||||
run: echo "${{ secrets.DEPLOY_TOKEN }}" | docker login --username ${{ secrets.DEPLOY_USER }} --password-stdin git.janky.solutions
|
run: echo "${{ secrets.DEPLOY_TOKEN }}" | docker login --username ${{ secrets.DEPLOY_USER }} --password-stdin git.janky.solutions
|
||||||
- name: build container image
|
- name: build container image
|
||||||
uses: docker/build-push-action@v4
|
uses: docker/build-push-action@v4
|
||||||
with:
|
with:
|
||||||
context: traefik-forward-auth/
|
file: Containerfile
|
||||||
tags: git.janky.solutions/jankysolutions/infra/traefik-forward-auth:${{ env.VERSION }}
|
context: "{{defaultContext}}:containers/traefik-forward-auth"
|
||||||
|
tags: git.janky.solutions/jankysolutions/infra/traefik-forward-auth:latest
|
||||||
platforms: linux/amd64
|
platforms: linux/amd64
|
||||||
push: true
|
push: true
|
||||||
|
|
10
containers/traefik-forward-auth/Containerfile
Normal file
10
containers/traefik-forward-auth/Containerfile
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
FROM library/golang:1.22 as builder
|
||||||
|
RUN git clone -b v2.3.0 https://github.com/thomseddon/traefik-forward-auth /go/traefik-forward-auth
|
||||||
|
WORKDIR /go/traefik-forward-auth
|
||||||
|
RUN CGO_ENABLED=0 go build -a -installsuffix nocgo -o /traefik-forward-auth ./cmd
|
||||||
|
|
||||||
|
# Copy into scratch container
|
||||||
|
FROM scratch
|
||||||
|
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
|
||||||
|
COPY --from=builder /traefik-forward-auth ./
|
||||||
|
ENTRYPOINT ["./traefik-forward-auth"]
|
Loading…
Reference in a new issue