Skip to content

Instantly share code, notes, and snippets.

@benwis
Created August 20, 2021 05:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save benwis/501f6ec5f55b9f0c4391cfe083b1a1b1 to your computer and use it in GitHub Desktop.
Save benwis/501f6ec5f55b9f0c4391cfe083b1a1b1 to your computer and use it in GitHub Desktop.
Flyctl Deploy Failure Dockerfile
# 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