add Containerfile + CI build
This commit is contained in:
parent
4cafcc1a11
commit
a983f73c59
2 changed files with 28 additions and 0 deletions
19
.forgejo/workflows/docker-build.yaml
Normal file
19
.forgejo/workflows/docker-build.yaml
Normal file
|
@ -0,0 +1,19 @@
|
|||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'main'
|
||||
jobs:
|
||||
build-container:
|
||||
runs-on: docker
|
||||
container:
|
||||
image: library/docker:dind
|
||||
steps:
|
||||
- run: apk add --no-cache nodejs git
|
||||
- name: login to container registry
|
||||
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login --username "${GITHUB_ACTOR}" --password-stdin git.janky.solutions
|
||||
- name: build container
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
file: Containerfile
|
||||
tags: git.janky.solutions/finn/s3-caching-proxy:latest
|
||||
push: true
|
9
Containerfile
Normal file
9
Containerfile
Normal file
|
@ -0,0 +1,9 @@
|
|||
FROM library/golang:1.20 as build
|
||||
ADD * /go/caching-proxy/
|
||||
WORKDIR /go/caching-proxy
|
||||
ARG GOPROXY=direct
|
||||
RUN CGO_ENABLED=0 go build .
|
||||
|
||||
FROM gcr.io/distroless/base-debian11
|
||||
COPY --from=build /go/caching-proxy/caching-proxy /caching-proxy
|
||||
ENTRYPOINT ["/caching-proxy"]
|
Loading…
Reference in a new issue