-
-
Save benwis/501f6ec5f55b9f0c4391cfe083b1a1b1 to your computer and use it in GitHub Desktop.
Flyctl Deploy Failure Dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Builder stage | |
FROM rust:1.53.0 AS builder | |
WORKDIR /app | |
COPY . . | |
ENV SQLX_OFFLINE true | |
RUN cargo build --release | |
# Runtime stage | |
FROM debian:buster-slim AS runtime | |
WORKDIR /app | |
# Install OpenSSL - it is dynamically linked by some of our dependencies | |
RUN apt-get update -y \ | |
&& apt-get install -y --no-install-recommends openssl \ | |
# Clean up | |
&& apt-get autoremove -y \ | |
&& apt-get clean -y \ | |
&& rm -rf /var/lib/apt/lists/* | |
# Copy the compiled binary from the builder environment | |
# to our runtime environment | |
COPY --from=builder /app/target/release/vidette vidette | |
# We need the configuration file at runtime! | |
COPY configuration configuration | |
ENV APP_ENVIRONMENT production | |
ENTRYPOINT ["./vidette"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment