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/*
|
||||
- .forgejo/workflows/build-keycloak.yaml
|
||||
jobs:
|
||||
build-synapse:
|
||||
build-keycloak:
|
||||
runs-on: docker
|
||||
container:
|
||||
image: library/docker:dind
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
on:
|
||||
push:
|
||||
paths:
|
||||
- containers/traefik-forward-auth/*
|
||||
- .forgejo/workflows/build-traefik-forward-auth.yaml
|
||||
env:
|
||||
VERSION: v2.3.0
|
||||
jobs:
|
||||
build-traefik-forward-auth:
|
||||
runs-on: docker
|
||||
|
@ -11,14 +10,13 @@ jobs:
|
|||
image: library/docker:dind
|
||||
steps:
|
||||
- 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
|
||||
run: echo "${{ secrets.DEPLOY_TOKEN }}" | docker login --username ${{ secrets.DEPLOY_USER }} --password-stdin git.janky.solutions
|
||||
- name: build container image
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
context: traefik-forward-auth/
|
||||
tags: git.janky.solutions/jankysolutions/infra/traefik-forward-auth:${{ env.VERSION }}
|
||||
file: Containerfile
|
||||
context: "{{defaultContext}}:containers/traefik-forward-auth"
|
||||
tags: git.janky.solutions/jankysolutions/infra/traefik-forward-auth:latest
|
||||
platforms: linux/amd64
|
||||
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