Browse Source

Merge pull request #1336 from gtardif/fix_sidecar_Dockerfiles

Fix sidecar Dockerfiles : Go 1.16 uses go modules by default
Guillaume Tardif 4 years ago
parent
commit
3f54d7f4d0
3 changed files with 3 additions and 3 deletions
  1. 1 1
      aci/etchosts/Dockerfile
  2. 1 1
      ecs/resolv/Dockerfile
  3. 1 1
      ecs/secrets/Dockerfile

+ 1 - 1
aci/etchosts/Dockerfile

@@ -15,7 +15,7 @@
 FROM golang:1.16 AS builder
 WORKDIR $GOPATH/src/github.com/docker/compose-cli/aci/etchosts
 COPY . .
-RUN CGO_ENABLED=0 go build -ldflags="-w -s" -o /go/bin/hosts main/main.go
+RUN GO111MODULE=auto CGO_ENABLED=0 go build -ldflags="-w -s" -o /go/bin/hosts main/main.go
 
 FROM scratch
 COPY --from=builder /go/bin/hosts /hosts

+ 1 - 1
ecs/resolv/Dockerfile

@@ -15,7 +15,7 @@
 FROM golang:1.16 AS builder
 WORKDIR $GOPATH/src/github.com/docker/compose-cli/ecs/resolv
 COPY . .
-RUN CGO_ENABLED=0 go build -ldflags="-w -s" -o /go/bin/resolv main/main.go
+RUN GO111MODULE=auto CGO_ENABLED=0 go build -ldflags="-w -s" -o /go/bin/resolv main/main.go
 
 FROM scratch
 COPY --from=builder /go/bin/resolv /resolv

+ 1 - 1
ecs/secrets/Dockerfile

@@ -15,7 +15,7 @@
 FROM golang:1.16 AS builder
 WORKDIR $GOPATH/src/github.com/docker/compose-cli/ecs/secrets
 COPY . .
-RUN CGO_ENABLED=0 go build -ldflags="-w -s" -o /go/bin/secrets main/main.go
+RUN GO111MODULE=auto CGO_ENABLED=0 go build -ldflags="-w -s" -o /go/bin/secrets main/main.go
 
 FROM scratch
 COPY --from=builder /go/bin/secrets /secrets