mirror of https://github.com/ouqiang/gocron
Update Dockerfile
parent
c59f8b730a
commit
7a949a22bf
20
Dockerfile
20
Dockerfile
|
@ -1,13 +1,17 @@
|
||||||
FROM golang:1.10-alpine as builder
|
FROM golang:1.15-alpine as builder
|
||||||
|
|
||||||
WORKDIR /go/src/github.com/ouqiang/gocron
|
|
||||||
|
|
||||||
COPY . .
|
|
||||||
|
|
||||||
RUN apk update \
|
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 build-vue \
|
||||||
&& make statik \
|
&& make statik \
|
||||||
&& CGO_ENABLED=0 make gocron
|
&& CGO_ENABLED=0 make gocron
|
||||||
|
@ -22,7 +26,7 @@ RUN cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
|
||||||
|
|
||||||
WORKDIR /app
|
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 ./
|
RUN chown -R app:app ./
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue