-
Notifications
You must be signed in to change notification settings - Fork 73
/
Copy pathDockerfile
34 lines (24 loc) · 999 Bytes
/
Dockerfile
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
FROM rust:1.83-alpine AS Builder
LABEL maintainer="Ilya Builuk <[email protected]>" \
org.opencontainers.image.title="A Vehicle Routing Problem solver CLI" \
org.opencontainers.image.description="A tool to solve real world Vehicle Routing Problems" \
org.opencontainers.image.source="https://github.com/reinterpretcat/vrp" \
org.opencontainers.image.licenses="Apache-2.0" \
org.opencontainers.image.authors="Ilya Builuk <[email protected]>"
RUN apk add --no-cache musl-dev
WORKDIR /src/
# copy source code
COPY Cargo.toml ./
COPY experiments/heuristic-research ./experiments/heuristic-research
COPY examples ./examples
COPY rosomaxa ./rosomaxa
COPY vrp-core ./vrp-core
COPY vrp-scientific ./vrp-scientific
COPY vrp-pragmatic ./vrp-pragmatic
COPY vrp-cli ./vrp-cli
RUN cargo build --release -p vrp-cli
FROM alpine:3.18
ENV SOLVER_DIR=/solver
RUN mkdir $SOLVER_DIR
COPY --from=Builder /src/target/release/vrp-cli $SOLVER_DIR/vrp-cli
WORKDIR $SOLVER_DIR