docker: reproducible builds within docker
This commit is contained in:
@@ -67,7 +67,10 @@ local Publish(registry, repo, secret, go, alpine, os, arch, trigger, platforms,
|
|||||||
image: "plugins/buildx",
|
image: "plugins/buildx",
|
||||||
privileged: true,
|
privileged: true,
|
||||||
environment: {
|
environment: {
|
||||||
DOCKER_BUILDKIT: "1"
|
DOCKER_BUILDKIT: "1",
|
||||||
|
SOURCE_DATE_EPOCH: 0,
|
||||||
|
TZ: "UTC",
|
||||||
|
LC_ALL: "C",
|
||||||
},
|
},
|
||||||
settings: {
|
settings: {
|
||||||
registry: registry,
|
registry: registry,
|
||||||
|
|||||||
14
.drone.yml
14
.drone.yml
@@ -89,6 +89,9 @@ platform:
|
|||||||
steps:
|
steps:
|
||||||
- environment:
|
- environment:
|
||||||
DOCKER_BUILDKIT: "1"
|
DOCKER_BUILDKIT: "1"
|
||||||
|
LC_ALL: C
|
||||||
|
SOURCE_DATE_EPOCH: 0
|
||||||
|
TZ: UTC
|
||||||
image: plugins/buildx
|
image: plugins/buildx
|
||||||
name: docker
|
name: docker
|
||||||
privileged: true
|
privileged: true
|
||||||
@@ -126,6 +129,9 @@ platform:
|
|||||||
steps:
|
steps:
|
||||||
- environment:
|
- environment:
|
||||||
DOCKER_BUILDKIT: "1"
|
DOCKER_BUILDKIT: "1"
|
||||||
|
LC_ALL: C
|
||||||
|
SOURCE_DATE_EPOCH: 0
|
||||||
|
TZ: UTC
|
||||||
image: plugins/buildx
|
image: plugins/buildx
|
||||||
name: docker
|
name: docker
|
||||||
privileged: true
|
privileged: true
|
||||||
@@ -163,6 +169,9 @@ platform:
|
|||||||
steps:
|
steps:
|
||||||
- environment:
|
- environment:
|
||||||
DOCKER_BUILDKIT: "1"
|
DOCKER_BUILDKIT: "1"
|
||||||
|
LC_ALL: C
|
||||||
|
SOURCE_DATE_EPOCH: 0
|
||||||
|
TZ: UTC
|
||||||
image: plugins/buildx
|
image: plugins/buildx
|
||||||
name: docker
|
name: docker
|
||||||
privileged: true
|
privileged: true
|
||||||
@@ -200,6 +209,9 @@ platform:
|
|||||||
steps:
|
steps:
|
||||||
- environment:
|
- environment:
|
||||||
DOCKER_BUILDKIT: "1"
|
DOCKER_BUILDKIT: "1"
|
||||||
|
LC_ALL: C
|
||||||
|
SOURCE_DATE_EPOCH: 0
|
||||||
|
TZ: UTC
|
||||||
image: plugins/buildx
|
image: plugins/buildx
|
||||||
name: docker
|
name: docker
|
||||||
privileged: true
|
privileged: true
|
||||||
@@ -230,6 +242,6 @@ trigger:
|
|||||||
type: docker
|
type: docker
|
||||||
---
|
---
|
||||||
kind: signature
|
kind: signature
|
||||||
hmac: 6df9c42b8cc689f661dc3612f39f5ffce2dea2f50a92e45355fed1d882ee8c5a
|
hmac: d487230b53d511ea07b872c70e0d3c21a3b7883d960e4011bc402c3467196baa
|
||||||
|
|
||||||
...
|
...
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ ENV GOOS=${TARGETOS}
|
|||||||
ENV GOARCH=${TARGETARCH}
|
ENV GOARCH=${TARGETARCH}
|
||||||
ENV GOTOOLCHAIN=${GOTOOLCHAIN}
|
ENV GOTOOLCHAIN=${GOTOOLCHAIN}
|
||||||
|
|
||||||
RUN go build -pgo=auto -v -trimpath -o "${GOBIN}/go-away" ./cmd/go-away
|
RUN go build -pgo=auto -v -trimpath -ldflags=-buildid= -o "${GOBIN}/go-away" ./cmd/go-away
|
||||||
RUN test -e "${GOBIN}/go-away"
|
RUN test -e "${GOBIN}/go-away"
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user