-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
40 lines (29 loc) · 715 Bytes
/
Copy pathDockerfile
File metadata and controls
40 lines (29 loc) · 715 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
29
30
31
32
33
34
35
36
37
38
39
# syntax = docker/dockerfile:1
#
# Yarn Build
#
FROM node:24 AS yarn_builder
WORKDIR /app
COPY . .
RUN npm install -g yarn@1.22.22 --force
RUN yarn install --frozen-lockfile && \
yarn clean && \
yarn build
#
# Rust Build
#
FROM rust:1.86 AS rust_builder
WORKDIR /app
COPY . .
COPY --from=yarn_builder /app/public ./public
RUN rustup target add x86_64-unknown-linux-musl
RUN cargo build --release --target x86_64-unknown-linux-musl
#
# Final Container
#
FROM alpine:latest
RUN apk update && apk add ca-certificates && rm -rf /var/cache/apk/*
WORKDIR /usr/local/bin
COPY --from=rust_builder /app/target/x86_64-unknown-linux-musl/release/estimation-engine .
EXPOSE 3000
CMD ["estimation-engine"]