-
-
Notifications
You must be signed in to change notification settings - Fork 257
Expand file tree
/
Copy pathdockerfile
More file actions
28 lines (19 loc) · 531 Bytes
/
Copy pathdockerfile
File metadata and controls
28 lines (19 loc) · 531 Bytes
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
FROM rust:alpine AS base
RUN apk add --no-cache musl-dev pkgconfig openssl-libs-static openssl-dev
FROM base AS builder-base
WORKDIR /usr/src/app
COPY Cargo.lock .
COPY Cargo.toml .
COPY realtime realtime
COPY shared shared
COPY signalr signalr
COPY api api
COPY simulator simulator
FROM builder-base AS builder
RUN cargo b -r
FROM alpine:3 AS api
COPY --from=builder /usr/src/app/target/release/api .
CMD [ "/api" ]
FROM alpine:3 AS realtime
COPY --from=builder /usr/src/app/target/release/realtime .
CMD [ "/realtime" ]