Skip to content
This repository was archived by the owner on Oct 13, 2023. It is now read-only.

Commit a82cf61

Browse files
Merge component 'engine' from [email protected]:docker/engine master
2 parents 812d7c9 + 07da12a commit a82cf61

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

components/engine/Dockerfile

+1
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,7 @@ FROM binary-base AS build-cross
354354
ARG DOCKER_CROSSPLATFORMS
355355
RUN --mount=type=cache,target=/root/.cache/go-build \
356356
--mount=type=bind,target=/go/src/github.com/docker/docker \
357+
--mount=type=tmpfs,target=/go/src/github.com/docker/docker/autogen \
357358
hack/make.sh cross
358359

359360
FROM scratch AS binary

components/engine/Makefile

+8-1
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,14 @@ cross: ## cross build the binaries for darwin, freebsd and\nwindows
172172

173173
cross: BUILD_OPTS += --build-arg CROSS=true --build-arg DOCKER_CROSSPLATFORMS
174174

175-
binary dynbinary cross: buildx
175+
# This is only used to work around read-only bind mounts of the source code into
176+
# binary build targets. We end up mounting a tmpfs over autogen which allows us
177+
# to write build-time generated assets even though the source is mounted read-only
178+
# ...But in order to do so, this dir needs to already exist.
179+
autogen:
180+
mkdir -p autogen
181+
182+
binary dynbinary cross: buildx autogen
176183
$(BUILD_CMD) $(BUILD_OPTS) --output=bundles/ --target=$@ $(VERSION_AUTOGEN_ARGS) .
177184

178185
build: target = --target=final

components/engine/hack/make/.go-autogen

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash
22

3-
rm -rf autogen
3+
rm -rf autogen/*
44

55
source hack/dockerfile/install/runc.installer
66
source hack/dockerfile/install/tini.installer

0 commit comments

Comments
 (0)