43 lines
1.1 KiB
Docker
43 lines
1.1 KiB
Docker
|
########################################################################################################################
|
||
|
# iowa build stage
|
||
|
########################################################################################################################
|
||
|
|
||
|
FROM rust:1.82.0-slim as build
|
||
|
|
||
|
COPY ./src ./src
|
||
|
COPY ./Cargo.lock .
|
||
|
COPY ./Cargo.toml .
|
||
|
|
||
|
RUN adduser \
|
||
|
--disabled-password \
|
||
|
--gecos "" \
|
||
|
--home "/nonexistent" \
|
||
|
--shell "/sbin/nologin" \
|
||
|
--no-create-home \
|
||
|
--uid 10001 \
|
||
|
"meta"
|
||
|
|
||
|
RUN cargo build --release
|
||
|
|
||
|
########################################################################################################################
|
||
|
# iowa image
|
||
|
########################################################################################################################
|
||
|
|
||
|
FROM scratch
|
||
|
|
||
|
COPY --from=build /etc/passwd /etc/passwd
|
||
|
COPY --from=build /etc/group /etc/group
|
||
|
|
||
|
COPY --from=build /config.toml /app/config.toml
|
||
|
COPY --from=build --chown=iowa:iowa ./target/release/metasearch /app/metasearch
|
||
|
|
||
|
USER meta:meta
|
||
|
|
||
|
ARG CONFIG
|
||
|
ENV CONFIG=${CONFIG}
|
||
|
EXPOSE 28019
|
||
|
|
||
|
ENTRYPOINT ["./app/metasearch", $CONFIG]
|
||
|
|
||
|
# ENTRYPOINT "./app/metasearch" $CONFIG
|