Skip to content

Commit a9abf9b

Browse files
committed
fix(docker): port build compatibility fixes
1 parent a14e32b commit a9abf9b

File tree

4 files changed

+10
-5
lines changed

4 files changed

+10
-5
lines changed

deploy/docker/Dockerfile.cli-macos

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,10 @@ RUN touch crates/openshell-cli/src/main.rs \
103103
crates/openshell-core/build.rs \
104104
proto/*.proto
105105

106-
# Declare version ARG here (not earlier) so the git-hash-bearing value does not
106+
# Declare version ARGs here (not earlier) so the git-hash-bearing values do not
107107
# invalidate the expensive dependency-build layers above on every commit.
108108
ARG OPENSHELL_CARGO_VERSION
109+
ARG OPENSHELL_IMAGE_TAG
109110
RUN --mount=type=cache,id=cargo-registry-cli-macos,sharing=locked,target=/root/.cargo/registry \
110111
--mount=type=cache,id=cargo-git-cli-macos,sharing=locked,target=/root/.cargo/git \
111112
--mount=type=cache,id=cargo-target-cli-macos-${CARGO_TARGET_CACHE_SCOPE},sharing=locked,target=/build/target \

deploy/docker/Dockerfile.gateway

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,11 @@ WORKDIR /app
9393

9494
COPY --from=builder /build/openshell-server /usr/local/bin/
9595

96-
# Copy migrations to the build-time manifest directory expected by sqlx
96+
# Copy migrations to the build-time manifest directory expected by sqlx.
97+
# Set stable world-readable permissions so restrictive host umasks do not make
98+
# migrations unreadable to the runtime `openshell` user.
9799
RUN mkdir -p /build/crates/openshell-server
98-
COPY crates/openshell-server/migrations /build/crates/openshell-server/migrations
100+
COPY --chmod=755 crates/openshell-server/migrations /build/crates/openshell-server/migrations
99101

100102
USER openshell
101103
EXPOSE 8080

deploy/docker/Dockerfile.python-wheels

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,10 @@ RUN touch crates/openshell-cli/src/main.rs \
8484
crates/openshell-core/build.rs \
8585
proto/*.proto
8686

87-
# Declare version ARG here (not earlier) so the git-hash-bearing value does not
87+
# Declare version ARGs here (not earlier) so the git-hash-bearing values do not
8888
# invalidate the expensive dependency-build layers above on every commit.
8989
ARG OPENSHELL_CARGO_VERSION
90+
ARG OPENSHELL_IMAGE_TAG
9091
RUN --mount=type=cache,id=cargo-registry-python-wheels-${TARGETARCH},sharing=locked,target=/root/.cargo/registry \
9192
--mount=type=cache,id=cargo-git-python-wheels-${TARGETARCH},sharing=locked,target=/root/.cargo/git \
9293
--mount=type=cache,id=cargo-target-python-wheels-${TARGETARCH}-${CARGO_TARGET_CACHE_SCOPE},sharing=locked,target=/build/target \

deploy/docker/Dockerfile.python-wheels-macos

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,10 @@ RUN touch crates/openshell-cli/src/main.rs \
9191
crates/openshell-core/build.rs \
9292
proto/*.proto
9393

94-
# Declare version ARG here (not earlier) so the git-hash-bearing value does not
94+
# Declare version ARGs here (not earlier) so the git-hash-bearing values do not
9595
# invalidate the expensive dependency-build layers above on every commit.
9696
ARG OPENSHELL_CARGO_VERSION
97+
ARG OPENSHELL_IMAGE_TAG
9798
RUN --mount=type=cache,id=cargo-registry-python-wheels-macos-${TARGETARCH},sharing=locked,target=/root/.cargo/registry \
9899
--mount=type=cache,id=cargo-git-python-wheels-macos-${TARGETARCH},sharing=locked,target=/root/.cargo/git \
99100
--mount=type=cache,id=cargo-target-python-wheels-macos-${TARGETARCH}-${CARGO_TARGET_CACHE_SCOPE},sharing=locked,target=/build/target \

0 commit comments

Comments
 (0)