gocron/Dockerfile

32 lines
554 B
Docker
Raw Normal View History

2018-05-18 14:20:41 +00:00
FROM golang:1.10-alpine as builder
WORKDIR /go/src/github.com/ouqiang/gocron
COPY . .
RUN apk update \
&& apk add --no-cache git ca-certificates make bash nodejs yarn
RUN make install-vue \
&& make build-vue \
&& make statik \
&& CGO_ENABLED=0 make gocron
FROM alpine:3.7
2018-05-20 07:24:31 +00:00
RUN apk add --no-cache ca-certificates \
&& addgroup -S app \
2018-05-18 14:20:41 +00:00
&& adduser -S -g app app
WORKDIR /app
COPY --from=builder /go/src/github.com/ouqiang/gocron/bin/gocron .
RUN chown -R app:app ./
EXPOSE 5920
USER app
2018-05-20 07:24:31 +00:00
ENTRYPOINT ["/app/gocron", "web"]