1 changed files with 20 additions and 0 deletions
@ -0,0 +1,20 @@ |
|||||
|
FROM golang:alpine |
||||
|
|
||||
|
# 为我们的镜像设置必要的环境变量 |
||||
|
ENV GO111MODULE=on \ |
||||
|
CGO_ENABLED=0 \ |
||||
|
GOOS=linux \ |
||||
|
GOARCH=amd64 \ |
||||
|
GOPROXY="https://goproxy.cn,direct" |
||||
|
|
||||
|
# Copy the current directory contents into the container |
||||
|
COPY . /go/src/beeblog/ |
||||
|
|
||||
|
WORKDIR /go/src/beeblog |
||||
|
|
||||
|
RUN go mod tidy |
||||
|
RUN go build |
||||
|
|
||||
|
EXPOSE 8082 |
||||
|
|
||||
|
CMD ["./beeblog"] |
Loading…
Reference in new issue