FROM rust:1-alpine3.16 AS build WORKDIR /app RUN apk add --update alpine-sdk COPY . . RUN cargo build --release FROM alpine:3.16 COPY --from=build /app/target/release/httpredirect-server /httpredirect-server ENV APP_HOST=0.0.0.0 ENV APP_PORT=80 EXPOSE 80 ENTRYPOINT [ "/httpredirect-server" ]