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/
|
|
|
|
|
2023-05-20 22:36:44 +02:00
|
|
|
RUN mkdir /data && \
|
|
|
|
chown -R www-data:www-data /data
|
|
|
|
|
2023-05-14 23:36:29 +02:00
|
|
|
WORKDIR /data
|
|
|
|
|
2023-05-15 13:52:30 +02:00
|
|
|
ENV TZ=Europe/Brussels
|
|
|
|
|
2023-05-14 23:36:29 +02:00
|
|
|
USER www-data:www-data
|
|
|
|
|
|
|
|
ENTRYPOINT ["/bin/dumb-init", "--"]
|
|
|
|
CMD ["/bin/affy"]
|