1234567891011121314151617181920212223 |
- # Build executable in builder container
- FROM docker.io/rust:1.87-alpine as builder
- WORKDIR /usr/src/myapp
- RUN apk add --no-cache openssl-dev openssl-libs-static musl-dev
- COPY Cargo.toml .
- COPY Cargo.lock .
- COPY README.md .
- COPY src src
- COPY static static
- COPY tmpl tmpl
- RUN cargo install --path . -F bundled_templates
- # Build final UIDC container
- FROM docker.io/alpine:3
- RUN apk add --no-cache tini
- RUN mkdir /uidc/
- VOLUME ["/uidc/"]
- ENV UIDC_CONFIG=/uidc/uidc.toml
- COPY --from=builder /usr/local/cargo/bin/uidc /usr/local/bin/uidc
- WORKDIR /uidc/
- ENTRYPOINT ["/sbin/tini", "--", "/usr/local/bin/uidc"]
- CMD ["serve"]
|