Don't run as root in the container
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Valentin Brandl 2019-05-28 21:46:47 +02:00
parent d9faf25648
commit a944e8b149
No known key found for this signature in database
GPG Key ID: 30D341DD34118D7D
2 changed files with 7 additions and 4 deletions

View File

@ -29,10 +29,13 @@ FROM alpine:latest
RUN apk --no-cache add --update git RUN apk --no-cache add --update git
RUN useradd --create-home hoc
WORKDIR /home/hoc
# once we don't need a git binary anymore, this should be enough # once we don't need a git binary anymore, this should be enough
# FROM scratch # FROM scratch
# COPY --from=linuxkit/ca-certificates:v0.7 / / # COPY --from=linuxkit/ca-certificates:v0.7 / /
COPY --from=builder /home/rust/src/target/x86_64-unknown-linux-musl/release/hoc /hoc COPY --from=builder /home/rust/src/target/x86_64-unknown-linux-musl/release/hoc .
ENTRYPOINT ["/hoc"] ENTRYPOINT ["/home/hoc/hoc"]

View File

@ -6,7 +6,7 @@ services:
# image: local/hoc:latest # image: local/hoc:latest
image: registry.gitlab.com/vbrandl/hoc:latest image: registry.gitlab.com/vbrandl/hoc:latest
volumes: volumes:
- ./repos:/repos - ./repos:/home/hoc/repos
- ./cache:/cache - ./cache:/home/hoc/cache
ports: ports:
- "127.0.0.1:8080:8080" - "127.0.0.1:8080:8080"