mirror of
https://github.com/docker/compose.git
synced 2025-07-01 10:54:29 +02:00
Go 1.16 uses go modules by default, setting GO111MODULE=auto to let it detect, and run as before
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
This commit is contained in:
parent
988813b130
commit
504ccf185e
@ -15,7 +15,7 @@
|
|||||||
FROM golang:1.16 AS builder
|
FROM golang:1.16 AS builder
|
||||||
WORKDIR $GOPATH/src/github.com/docker/compose-cli/aci/etchosts
|
WORKDIR $GOPATH/src/github.com/docker/compose-cli/aci/etchosts
|
||||||
COPY . .
|
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
|
FROM scratch
|
||||||
COPY --from=builder /go/bin/hosts /hosts
|
COPY --from=builder /go/bin/hosts /hosts
|
@ -15,7 +15,7 @@
|
|||||||
FROM golang:1.16 AS builder
|
FROM golang:1.16 AS builder
|
||||||
WORKDIR $GOPATH/src/github.com/docker/compose-cli/ecs/resolv
|
WORKDIR $GOPATH/src/github.com/docker/compose-cli/ecs/resolv
|
||||||
COPY . .
|
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
|
FROM scratch
|
||||||
COPY --from=builder /go/bin/resolv /resolv
|
COPY --from=builder /go/bin/resolv /resolv
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
FROM golang:1.16 AS builder
|
FROM golang:1.16 AS builder
|
||||||
WORKDIR $GOPATH/src/github.com/docker/compose-cli/ecs/secrets
|
WORKDIR $GOPATH/src/github.com/docker/compose-cli/ecs/secrets
|
||||||
COPY . .
|
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
|
FROM scratch
|
||||||
COPY --from=builder /go/bin/secrets /secrets
|
COPY --from=builder /go/bin/secrets /secrets
|
||||||
|
Loading…
x
Reference in New Issue
Block a user