Dockerfile 348 字节
Newer Older
1
FROM golang:alpine
R
rainyan 已提交
2

3 4 5
ENV GO111MODULE=on
ENV GOPROXY=https://goproxy.io,direct
WORKDIR /go/src/gin-vue-admin
6
COPY . .
m0_50812349's avatar
m0_50812349 已提交
7

8 9 10 11 12 13
RUN go env && go build -o server .

FROM alpine:latest
LABEL MAINTAINER="SliverHorn@sliver_horn@qq.com"

WORKDIR /go/src/gin-vue-admin
m0_50812349's avatar
m0_50812349 已提交
14 15

COPY --from=0 /go/src/gin-vue-admin ./
R
rainyan 已提交
16 17

EXPOSE 8888
R
rainyan 已提交
18

m0_50812349's avatar
m0_50812349 已提交
19
ENTRYPOINT ./server -c config.docker.yaml