modify Dockerfile

This commit is contained in:
zkqiang
2021-05-17 14:45:21 +08:00
parent 9209adb17c
commit 99ff741747
2 changed files with 9 additions and 7 deletions

View File

@@ -1,4 +1,4 @@
FROM golang:latest AS backend-build
FROM golang:1 AS backend-build
WORKDIR /go/src/app
COPY ./backend .
@@ -6,9 +6,10 @@ COPY ./backend .
ENV GO111MODULE on
ENV GOPROXY https://goproxy.io
RUN go install -v ./...
RUN go mod tidy \
&& go install -v ./...
FROM node:latest AS frontend-build
FROM node:12 AS frontend-build
ADD ./frontend /app
WORKDIR /app

View File

@@ -1,14 +1,15 @@
FROM golang:latest AS backend-build
FROM golang:1 AS backend-build
WORKDIR /go/src/app
COPY ./backend .
ENV GO111MODULE on
ENV GOPROXY https://goproxy.cn
ENV GOPROXY https://goproxy.io
RUN go install -v ./...
RUN go mod tidy \
&& go install -v ./...
FROM node:latest AS frontend-build
FROM node:12 AS frontend-build
ADD ./frontend /app
WORKDIR /app