mirror of
https://github.com/ouqiang/gocron.git
synced 2024-04-21 12:31:58 +00:00
Update Dockerfile
This commit is contained in:
+12
-8
@@ -1,13 +1,17 @@
|
||||
FROM golang:1.10-alpine as builder
|
||||
|
||||
WORKDIR /go/src/github.com/ouqiang/gocron
|
||||
|
||||
COPY . .
|
||||
FROM golang:1.15-alpine as builder
|
||||
|
||||
RUN apk update \
|
||||
&& apk add --no-cache git ca-certificates make bash nodejs yarn
|
||||
&& apk add --no-cache git ca-certificates make bash yarn nodejs
|
||||
|
||||
RUN make install-vue \
|
||||
RUN go env -w GO111MODULE=on && \
|
||||
go env -w GOPROXY=https://goproxy.cn,direct
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
RUN git clone https://github.com/ouqiang/gocron.git \
|
||||
&& cd gocron \
|
||||
&& yarn config set ignore-engines true \
|
||||
&& make install-vue \
|
||||
&& make build-vue \
|
||||
&& make statik \
|
||||
&& CGO_ENABLED=0 make gocron
|
||||
@@ -22,7 +26,7 @@ RUN cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY --from=builder /go/src/github.com/ouqiang/gocron/bin/gocron .
|
||||
COPY --from=builder /app/gocron/bin/gocron .
|
||||
|
||||
RUN chown -R app:app ./
|
||||
|
||||
|
||||
Reference in New Issue
Block a user