Skip to content

Commit

Permalink
Optimize docker images build time
Browse files Browse the repository at this point in the history
  • Loading branch information
palexster committed May 19, 2021
1 parent d1e86e5 commit ee31a52
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions build/advertisement-broadcaster/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
FROM golang:1.16 as builder
ENV PATH /go/bin:/usr/local/go/bin:$PATH
ENV GOPATH /go
COPY go.mod /go/src/github.com/liqotech/liqo/go.mod
COPY go.sum /go/src/github.com/liqotech/liqo/go.sum
RUN cd /go/src/github.com/liqotech/liqo/ && go mod download
COPY . /go/src/github.com/liqotech/liqo
WORKDIR /go/src/github.com/liqotech/liqo
RUN CGO_ENABLED=0 GOOS=linux GOARCH=$(go env GOARCH) go build ./cmd/advertisement-broadcaster/
Expand Down

0 comments on commit ee31a52

Please sign in to comment.