Skip to content

Commit

Permalink
add env to Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
grj1046 committed Apr 1, 2021
1 parent 98f09e0 commit a262741
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
## build
FROM golang:1.16.2-alpine3.13 as builder

ENV GO111MODULE=on
ENV GOPROXY=https://goproxy.cn,direct
ENV GO111MODULE=on \
GOPROXY=https://goproxy.cn,direct

#RUN apk add --no-cache gcc musl-dev libxml2-dev libxslt-dev

Expand All @@ -15,6 +15,9 @@ RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags '-w -s' -a -installs
## smallest image
FROM scratch

ENV HOTSPOT_TIMER_DURATION=10 \
HOTSPOT_HTTP_PORT=80

COPY --from=builder /go/bin/hotspot /go/bin/hotspot

EXPOSE 80
Expand Down

0 comments on commit a262741

Please sign in to comment.