-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
34 lines (21 loc) · 875 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
# syntax=docker/dockerfile:1.4
FROM node:20-bullseye as builder
WORKDIR /app
# Install rust
RUN \
curl --proto '=https' --tlsv1.2 -sSf --output /tmp/rustup https://sh.rustup.rs && \
chmod +x /tmp/rustup && \
bash /tmp/rustup -y
ENV PATH="$PATH:/root/.cargo/bin"
RUN rustup target add wasm32-unknown-unknown
# Install Cargo B(inary)Install
RUN curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
RUN cargo binstall --no-confirm trunk
COPY package.json package-lock.yaml ./
RUN npm ci
COPY . .
RUN trunk build --release
FROM nginxinc/nginx-unprivileged:1.25-alpine
EXPOSE 8000
COPY --from=builder --link /app/dist/ /usr/share/nginx/html/
COPY ./nginx.conf /etc/nginx/conf.d/default.conf