<commit_before>FROM rust:1.32.0 as builder

RUN apt-get update \
 && apt-get install -y cmake \
 && rm -rf /var/lib/apt/lists/*

# RUN USER=root cargo new --bin /usr/src/josh
WORKDIR /usr/src/josh

# COPY ./Cargo.lock ./Cargo.lock
# COPY ./Cargo.toml ./Cargo.toml
# COPY ./prebuild.rs ./build.rs
#
# RUN cargo build --release && rm src/*.rs 

COPY . .

# RUN rm ./target/release/deps/josh* && cargo build --release
RUN cargo build --release

FROM rust:1.32.0

COPY --from=builder /usr/src/josh/target/release/josh-proxy /usr/bin/josh-proxy

CMD josh-proxy --local=/tmp/josh-scratch/ --remote=https://gerrit.int.esrlabs.com<commit_msg>Print backtrace<commit_after>FROM rust:1.32.0 as builder

RUN apt-get update \
 && apt-get install -y cmake \
 && rm -rf /var/lib/apt/lists/*

# RUN USER=root cargo new --bin /usr/src/josh
WORKDIR /usr/src/josh

# COPY ./Cargo.lock ./Cargo.lock
# COPY ./Cargo.toml ./Cargo.toml
# COPY ./prebuild.rs ./build.rs
#
# RUN cargo build --release && rm src/*.rs 

COPY . .

# RUN rm ./target/release/deps/josh* && cargo build --release
RUN cargo build

FROM rust:1.32.0

COPY --from=builder /usr/src/josh/target/debug/josh-proxy /usr/bin/josh-proxy

CMD RUST_BACKTRACE=1 josh-proxy --local=/tmp/josh-scratch/ --remote=https://gerrit.int.esrlabs.com
{'fraction_non_alphanumeric': 0.17333333333333334, 'fraction_numerical': 0.013333333333333334, 'mean_word_length': 2.8433734939759034, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '2694369', 'n_tokens_mistral': 514, 'n_tokens_neox': 499, 'n_words': 116}