Skip to content

Commit

Permalink
separate into build and runtime stage
Browse files Browse the repository at this point in the history
  • Loading branch information
aki-mizu committed Dec 3, 2024
1 parent 589bef6 commit 6b9ff46
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,14 @@ RUN /bin/bash -c "source /root/.nix-profile/etc/profile.d/nix.sh && \
cd /usr/src/app && \
/root/.nix-profile/bin/nix develop --extra-experimental-features nix-command --extra-experimental-features flakes --command cargo build --release --bin cdk-mintd"

# Create a runtime stage
FROM debian:bullseye-slim

# Set the working directory
WORKDIR /usr/src/app

# Copy the built application from the build stage
COPY --from=builder /usr/src/app/target/release/cdk-mintd /usr/src/app/target/release/cdk-mintd

# Set the entry point for the container
CMD ["/usr/src/app/target/release/cdk-mintd"]

0 comments on commit 6b9ff46

Please sign in to comment.