-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
42 lines (30 loc) · 1.1 KB
/
Copy pathDockerfile
File metadata and controls
42 lines (30 loc) · 1.1 KB
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
40
41
42
FROM rust:1.94-bookworm AS builder
WORKDIR /app
RUN apt-get update \
&& apt-get install -y --no-install-recommends curl ca-certificates build-essential pkg-config libssl-dev \
&& curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
&& apt-get install -y --no-install-recommends nodejs \
&& rm -rf /var/lib/apt/lists/*
COPY package.json package-lock.json ./
RUN npm ci
COPY Cargo.toml Cargo.lock ./
COPY main.rs squads_v4.rs wallet_store.rs ./
COPY sol-safekey ./sol-safekey
COPY src ./src
COPY public ./public
COPY scripts ./scripts
COPY components.json eslint.config.mjs next.config.ts postcss.config.js postcss.config.mjs tailwind.config.js tsconfig.json ./
RUN npm run build
RUN cargo build --release
FROM debian:bookworm-slim AS runtime
WORKDIR /app
RUN apt-get update \
&& apt-get install -y --no-install-recommends ca-certificates \
&& rm -rf /var/lib/apt/lists/*
COPY --from=builder /app/target/release/sol-safekey-ui /usr/local/bin/sol-safekey-ui
ENV HOST=0.0.0.0
ENV PORT=3841
ENV SOL_SAFEKEY_DB_PATH=/app/data/sol-safekey.sqlite3
VOLUME ["/app/data"]
EXPOSE 3841
CMD ["sol-safekey-ui"]