Skip to content

Commit 95f92c4

Browse files
committed
fix: ensure nix profiles are on path.
1 parent 27fffd7 commit 95f92c4

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

docker/build/movement/Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ RUN adduser -u 1000 -D -s /bin/bash movement
2828
COPY --from=builder /tmp/build/target/release/movement /app/movement
2929
COPY --from=builder /tmp/runtime/nix/store /nix/store
3030

31+
# Build up runtime PATH from all bin directories in /nix/store
32+
RUN echo "export PATH=$(find /nix/store -type d -path '*/bin' | paste -sd: -):\$PATH" >> /etc/profile.d/nix-path.sh
33+
ENV PATH="/nix/store:$(find /nix/store -type d -path '*/bin' | paste -sd: -):$PATH"
34+
3135
# Environment setup
3236
ENV PATH="/nix/var/nix/profiles/default/bin:$PATH"
3337
ENV XDG_RUNTIME_DIR="/run/user/1000"

docker/build/mtma/Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ RUN adduser -u 1000 -D -s /bin/bash mtma
2727
COPY --from=builder /tmp/build/target/release/mtma /app/mtma
2828
COPY --from=builder /tmp/runtime/nix/store /nix/store
2929

30+
# Build up runtime PATH from all bin directories in /nix/store
31+
RUN echo "export PATH=$(find /nix/store -type d -path '*/bin' | paste -sd: -):\$PATH" >> /etc/profile.d/nix-path.sh
32+
ENV PATH="/nix/store:$(find /nix/store -type d -path '*/bin' | paste -sd: -):$PATH"
33+
3034
# Environment setup
3135
ENV PATH="/nix/var/nix/profiles/default/bin:$PATH"
3236
ENV XDG_RUNTIME_DIR="/run/user/1000"

0 commit comments

Comments
 (0)