account/Dockerfile

25 lines
446 B
Text
Raw Normal View History

FROM rust:alpine as builder
RUN apk add --no-cache musl-dev openssl-dev musl openssl libcrypto3
2025-03-05 23:20:11 +01:00
WORKDIR /app
COPY . .
2025-03-07 11:48:39 +00:00
RUN cargo build --profile prod
2025-03-05 23:20:11 +01:00
2025-03-06 11:36:21 +00:00
RUN rm .env
FROM rust:alpine AS final
2025-03-05 23:20:11 +01:00
WORKDIR /app
# Copy the compiled binary from the builder stage
COPY --from=builder /app/target/release/account /app/account
# Set executable permissions
2025-03-06 11:41:04 +00:00
RUN chmod +x /app/account
2025-03-05 23:20:11 +01:00
# Command to run the application
CMD ["ls /app"]
CMD ["/app/account"]