diff --git a/docker/compose.yaml b/docker/compose.yaml index fcd5f17745..9bc79234d1 100644 --- a/docker/compose.yaml +++ b/docker/compose.yaml @@ -4,14 +4,6 @@ services: container_name: ifcopenshell-${UNIQUE_ID} image: ifcopenshell-build-env:updated platform: linux/amd64 - # There's no `build:` section - the image is always produced ahead of - # time by `./ifcos_env create` (`docker build`, not `docker compose - # build`). Without this, a platform mismatch between the pin above and - # whatever's in the local image store makes compose treat the image as - # absent and fall back to pulling ifcopenshell-build-env:updated from - # Docker Hub, where it doesn't exist. Fail fast with a clear "not - # found" instead of an obscure registry access-denied error. - pull_policy: never volumes: - type: bind source: ../ diff --git a/docker/ifcos_env b/docker/ifcos_env index c35ba85d2e..72263065b5 100755 --- a/docker/ifcos_env +++ b/docker/ifcos_env @@ -24,18 +24,7 @@ set_env function create() { echo "⭐ Creating image: ifcopenshell-build-env" - # compose.yaml pins the service to platform: linux/amd64 (this stack - # always targets the rockylinux9-x64 build-outputs branch and produces - # linux64 artifacts, regardless of host arch). Building without - # --platform would tag the image for the host's native arch instead - - # harmless on an amd64 host, but on an arm64 host (e.g. Apple Silicon) - # it leaves a local image that doesn't match what compose asked for, so - # `docker compose up` decides the requested platform is "missing" and - # tries to pull ifcopenshell-build-env:updated from Docker Hub instead - # of using the image just built. Pinning the build platform here keeps - # the local image's arch in sync with compose's pin on every host. docker build -f Dockerfile \ - --platform linux/amd64 \ --build-arg USER_UID="$(id -u)" --build-arg USER_GID="$(id -g)" \ -t ifcopenshell-build-env:updated . }