Set runtime image base on alpine
This commit is contained in:
parent
39e3b5ae5c
commit
b100583d7d
1 changed files with 3 additions and 3 deletions
|
@ -13,11 +13,11 @@ COPY . /go/src/github.com/chihaya/chihaya
|
||||||
# Install our golang dependencies and compile our binary.
|
# Install our golang dependencies and compile our binary.
|
||||||
RUN glide install
|
RUN glide install
|
||||||
RUN CGO_ENABLED=0 go install github.com/chihaya/chihaya/cmd/chihaya
|
RUN CGO_ENABLED=0 go install github.com/chihaya/chihaya/cmd/chihaya
|
||||||
RUN adduser -D chihaya
|
|
||||||
|
|
||||||
FROM scratch
|
FROM alpine:latest
|
||||||
COPY --from=build-env /go/bin/chihaya /chihaya
|
COPY --from=build-env /go/bin/chihaya /chihaya
|
||||||
COPY --from=build-env /etc/passwd /etc/passwd
|
|
||||||
|
RUN adduser -D chihaya
|
||||||
|
|
||||||
# Expose a docker interface to our binary.
|
# Expose a docker interface to our binary.
|
||||||
EXPOSE 6880 6881
|
EXPOSE 6880 6881
|
||||||
|
|
Loading…
Reference in a new issue