affluence/Dockerfile

36 lines
684 B
Docker
Raw Permalink Normal View History

2023-05-14 23:36:29 +02:00
FROM rust:1.69-alpine AS builder
ARG DI_VER=1.2.5
RUN apk update && \
apk add --no-cache build-base curl
WORKDIR /build
# Build dumb-init
RUN curl -Lo - "https://github.com/Yelp/dumb-init/archive/refs/tags/v${DI_VER}.tar.gz" | tar -xzf - && \
cd "dumb-init-${DI_VER}" && \
make SHELL=/bin/sh && \
mv dumb-init ..
WORKDIR /build/affy
COPY ./ ./
RUN cargo build --release && \
[ "$(readelf -d target/release/affy | grep NEEDED | wc -l)" = 0 ]
FROM busybox:1.36.0
COPY --from=builder /build/dumb-init /build/affy/target/release/affy /bin/
WORKDIR /data
ENV TZ=Europe/Brussels
2023-05-14 23:36:29 +02:00
USER www-data:www-data
ENTRYPOINT ["/bin/dumb-init", "--"]
CMD ["/bin/affy"]