-
Notifications
You must be signed in to change notification settings - Fork 75
/
Copy pathDockerfile.checker
47 lines (37 loc) · 1.19 KB
/
Dockerfile.checker
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
##
## Create small Docker image with the checker only
##
#
# Local usage:
# $ docker build -t opl-checker -f Dockerfile.checker .
# $ docker run --rm --name opl-checker \
# -v $PWD/lifter-data:/lifter-data \
# -v $PWD/meet-data:/meet-data \
# opl-checker
# Build checker binary
FROM rust:slim AS builder
RUN rustup target add x86_64-unknown-linux-musl
RUN apt-get update -qq && apt-get install -y \
build-essential \
libjemalloc2 \
musl-tools
COPY Cargo.* ./
COPY checker checker/
COPY crates crates/
COPY goodlift-import goodlift-import/
COPY scripts scripts/
COPY server server/
COPY tests tests/
RUN cargo build --release --package checker \
--target=x86_64-unknown-linux-musl \
--features=jemalloc
# Use a smaller base image for the final image.
# TODO: Once check-lifter-data is folded into the checker proper, this can be stock alpine.
FROM python:3.12.6-alpine
# Ripgrep speeds up `tests/check-line-endings`.
RUN apk --no-cache add ripgrep
COPY --from=builder \
target/x86_64-unknown-linux-musl/release/checker /usr/bin/
COPY --from=builder scripts/oplcsv.py /usr/bin/
COPY --from=builder tests/check-lifter-data /usr/bin/
CMD ["/usr/bin/checker"]