Files
gamma_basic_auth_proxy/Dockerfile
2021-07-16 00:12:14 +02:00

28 lines
593 B
Docker

###################
### BUILD STAGE ###
###################
FROM rust:1.52 as build_stage
# Install build dependencies
RUN rustup target add x86_64-unknown-linux-musl
# Build project
WORKDIR /app
COPY . .
RUN cargo build --release --target x86_64-unknown-linux-musl
RUN strip target/x86_64-unknown-linux-musl/release/auth_proxy
########################
### PRODUCTION STAGE ###
########################
FROM scratch
EXPOSE 3000
WORKDIR /
# Copy application binary
COPY --from=build_stage /app/target/x86_64-unknown-linux-musl/release/auth_proxy auth_proxy
CMD ["/auth_proxy", "--help"]