Set runtime image base on alpine

This commit is contained in:
Ilya Glotov 2017-12-20 14:51:11 +03:00
parent 39e3b5ae5c
commit b100583d7d
No known key found for this signature in database
GPG key ID: AE18CC224730A36D

View file

@ -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