Skip to content

Commit 495fe4c

Browse files
authored
fix(docker): set migrations dir permissions to 755 on COPY (#475)
Docker COPY preserves build-host file permissions. On hosts with a restrictive umask (e.g. 0027), the migrations directory is copied as 750 root:root, making it unreadable by the openshell user at runtime and causing the server to crash with a permission denied error on startup. Using --chmod=755 ensures the directory is always world-readable regardless of the build host umask. Signed-off-by: Evan Lezar <elezar@nvidia.com>
1 parent c0cdd66 commit 495fe4c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

deploy/docker/Dockerfile.images

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ WORKDIR /app
168168
COPY --from=gateway-builder /build/out/openshell-server /usr/local/bin/
169169

170170
RUN mkdir -p /build/crates/openshell-server
171-
COPY crates/openshell-server/migrations /build/crates/openshell-server/migrations
171+
COPY --chmod=755 crates/openshell-server/migrations /build/crates/openshell-server/migrations
172172

173173
USER openshell
174174
EXPOSE 8080

0 commit comments

Comments
 (0)