fix: config path (#978)

* fix: config path

* change cache

* use alpine

* workaround the lifecycle hook problem
This commit is contained in:
Florian Forster 2020-11-17 20:55:41 +01:00 committed by GitHub
parent 119ddbfa09
commit 955dec8694
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 14 additions and 13 deletions

View File

@ -31,7 +31,6 @@ jobs:
tags: ${{ env.REGISTRY }}/${{ github.repository }}:coverage
push: false
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,mode=max,dest=/tmp/.buildx-cache
target: go-codecov
outputs: type=local,dest=.
- uses: codecov/codecov-action@v1

View File

@ -4,7 +4,7 @@ services:
angular:
build:
context: ..
dockerfile: build/Dockerfile
dockerfile: build/dockerfile
target: dev-angular-build
args:
ENV: dev
@ -14,7 +14,7 @@ services:
go:
build:
context: ..
dockerfile: build/Dockerfile
dockerfile: build/dockerfile
target: dev-go-build
args:
ENV: dev

View File

@ -4,7 +4,7 @@ services:
angular:
build:
context: ..
dockerfile: build/Dockerfile
dockerfile: build/dockerfile
target: dev-angular-build
args:
ENV: dev
@ -14,7 +14,7 @@ services:
go:
build:
context: ..
dockerfile: build/Dockerfile
dockerfile: build/dockerfile
target: dev-go-build
args:
ENV: dev

View File

@ -112,16 +112,18 @@ RUN go get github.com/go-delve/delve/cmd/dlv
#######################
## Final Production Image
#######################
FROM ${ENV}-go-build as artifact
RUN useradd zitadel
COPY cmd/zitadel/*.yaml app/
RUN chmod a+x zitadel-linux-amd64
RUN mv zitadel-linux-amd64 app/zitadel
FROM alpine:latest as artifact
RUN adduser -D zitadel
COPY cmd/zitadel/*.yaml /
COPY --from=prod-go-build /go/src/github.com/caos/zitadel/zitadel-linux-amd64 /zitadel
RUN chmod a+x zitadel
RUN ls -la /
## Scratch Image
FROM scratch as final
FROM scratch as final
COPY --from=artifact /etc/passwd /etc/passwd
COPY --from=artifact /go/src/github.com/caos/zitadel/app app/
## TODO copy should be removed once the operator branch is merged
COPY --from=artifact / /
USER zitadel
HEALTHCHECK NONE
ENTRYPOINT ["/app/zitadel"]
ENTRYPOINT ["/zitadel"]