<commit_before>FROM rust:1.38-slim-buster
WORKDIR /app

ENV GODCOIN_HOME="/data"

RUN apt-get update && \
    apt-get install -y \
        libsodium23 \
        libsodium-dev \
        make \
        clang

# Required for libsodium-sys crate
RUN rustup component add rustfmt

# Copy and build
COPY . .
RUN cargo install --path ./crates/server \
    && rm -r ./target

STOPSIGNAL SIGINT
ENTRYPOINT ["godcoin-server"]<commit_msg>Use multistage docker builds to shrink image size<commit_after>##### Stage 0
FROM rust:1.39-slim-buster

RUN apt-get update && \
    apt-get install -y \
        libsodium23 \
        libsodium-dev \
        make \
        clang

# Required for libsodium-sys crate
RUN rustup component add rustfmt

# Copy and build
COPY . .
RUN cargo install --path ./crates/server \
    && rm -r ./target

##### Stage 1
FROM debian:buster-slim
WORKDIR /app

ENV GODCOIN_HOME="/data"

COPY --from=0 /usr/local/cargo/bin/godcoin-server /app

STOPSIGNAL SIGINT
ENTRYPOINT ["/app/godcoin-server"]
{'fraction_non_alphanumeric': 0.11155378486055777, 'fraction_numerical': 0.012948207171314742, 'mean_word_length': 2.5638297872340425, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2785533', 'n_tokens_mistral': 360, 'n_tokens_neox': 333, 'n_words': 99}