Skip to content
Permalink
Browse files

fix(docker): build error

  • Loading branch information...
giuem committed Feb 9, 2019
1 parent 3658823 commit bf64e6fe2912b06b7fe3868cc2b89bbae53558f0
Showing with 13 additions and 8 deletions.
  1. +5 −0 .dockerignore
  2. +8 −8 Dockerfile
@@ -0,0 +1,5 @@
node_module/
js/
package.json

*.log
@@ -2,28 +2,28 @@ FROM golang:1.11-alpine AS BUILD

WORKDIR /src

# module
RUN apk --no-cache add git ca-certificates tzdata && update-ca-certificates

COPY go.mod go.sum ./

RUN go mod download

COPY . .

# build
COPY ga ga
COPY server server
COPY main.go ./
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags "-w -s" -o ga-proxy

FROM alpine:3.8
LABEL maintainer "giuem <i@giuem.com>"

LABEL maintainer "giuem <giuemcom+docker@gmail.com>"
EXPOSE 80
ENV IP=0.0.0.0
ENV PORT=80

COPY --from=BUILD /usr/share/zoneinfo /usr/share/zoneinfo
COPY --from=BUILD /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=BUILD /src/ga_proxy /ga_proxy
COPY --from=BUILD /src/ga-proxy /ga-proxy

HEALTHCHECK --interval=1m --timeout=10s --start-period=1s --retries=2 \
CMD /ga-proxy ping

CMD ["/ga-proxy", "-i", "0.0.0.0", "-p", "80" ]
CMD ["/ga-proxy"]

0 comments on commit bf64e6f

Please sign in to comment.
You can’t perform that action at this time.