add dockerfiles/flux-image-reflector-controller.Dockerfile

This commit is contained in:
Haitao Pan 2023-01-13 15:02:25 +08:00
parent 8591dc90d3
commit 9f601d28fa
2 changed files with 37 additions and 0 deletions

View File

@ -0,0 +1,28 @@
name: Build & push flux-automation-controller image
on:
pull_request:
push:
paths:
- 'dockerfiles/flux-image-reflector-controller.Dockerfile'
- '.github/workflows/flux-image-reflector-controller.yaml'
branches:
- main
jobs:
docker:
runs-on: ubuntu-latest
name: Build docker image
steps:
- uses: actions/checkout@master
- name: 'Artifact: build && push fluxcd/image-reflector-controller image'
uses: aevea/action-kaniko@v0.10.0
with:
registry: artifact.onwalk.net
username: admin
password: ${{ secrets.HELM_REPO_PASSWORD }}
build_file: dockerfiles/flux-image-automation-controller.Dockerfile
image: k8s/fluxcd/image-reflector-controller
tag: v0.24.0
cache: true
cache_registry: cache

View File

@ -0,0 +1,9 @@
FROM ghcr.io/fluxcd/image-reflector-controller:v0.24.0 as build
FROM artifact.onwalk.net/k8s/alpine-ca:3.13 as prod
RUN apk add --no-cache ca-certificates tini
COPY --from=builder /usr/local/bin/image-reflector-controller /usr/local/bin/
USER 65534:65534
ENTRYPOINT [ "/sbin/tini", "--", "image-reflector-controller" ]