2025-03-06 18:43:38 +01:00
|
|
|
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:47:31 +00:00
|
|
|
RUN cargo build --profile release-lto
|
2025-03-05 23:20:11 +01:00
|
|
|
|
2025-03-06 11:36:21 +00:00
|
|
|
RUN rm .env
|
|
|
|
|
|
2025-03-06 18:43:38 +01:00
|
|
|
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"]
|