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 tags: ${{ env.REGISTRY }}/${{ github.repository }}:coverage
push: false push: false
cache-from: type=local,src=/tmp/.buildx-cache cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,mode=max,dest=/tmp/.buildx-cache
target: go-codecov target: go-codecov
outputs: type=local,dest=. outputs: type=local,dest=.
- uses: codecov/codecov-action@v1 - uses: codecov/codecov-action@v1

View File

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

View File

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

View File

@ -112,16 +112,18 @@ RUN go get github.com/go-delve/delve/cmd/dlv
####################### #######################
## Final Production Image ## Final Production Image
####################### #######################
FROM ${ENV}-go-build as artifact FROM alpine:latest as artifact
RUN useradd zitadel RUN adduser -D zitadel
COPY cmd/zitadel/*.yaml app/ COPY cmd/zitadel/*.yaml /
RUN chmod a+x zitadel-linux-amd64 COPY --from=prod-go-build /go/src/github.com/caos/zitadel/zitadel-linux-amd64 /zitadel
RUN mv zitadel-linux-amd64 app/zitadel RUN chmod a+x zitadel
RUN ls -la /
## Scratch Image ## Scratch Image
FROM scratch as final FROM scratch as final
COPY --from=artifact /etc/passwd /etc/passwd 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 USER zitadel
HEALTHCHECK NONE HEALTHCHECK NONE
ENTRYPOINT ["/app/zitadel"] ENTRYPOINT ["/zitadel"]