-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
30 lines (28 loc) · 1.05 KB
/
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
# syntax=docker/dockerfile:1
FROM rust:latest AS base
RUN apt-get update
RUN apt-get install -y ca-certificates curl gnupg
RUN mkdir -p /etc/apt/keyrings
RUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
ENV NODE_MAJOR=20
RUN echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list
RUN apt-get update
RUN apt-get install -y nodejs libssl-dev git g++ cmake ninja-build
WORKDIR /usr/wallowa
RUN --mount=type=bind,source=package.json,target=package.json \
--mount=type=bind,source=package-lock.json,target=package-lock.json \
npm ci
COPY ./ ./
RUN npm run clean
RUN npm run build:css
RUN npm run build:esbuild
RUN npm run build:static
RUN npm run build:backend
FROM ubuntu:23.10
RUN apt-get update
RUN apt-get install -y ca-certificates
RUN mkdir /usr/wallowa
WORKDIR /usr/wallowa
COPY --from=base /usr/wallowa/target/release/wallowa /usr/local/bin/wallowa
ENTRYPOINT ["wallowa"]
EXPOSE 9843