-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
53 lines (37 loc) · 943 Bytes
/
Dockerfile
File metadata and controls
53 lines (37 loc) · 943 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
FROM node:22-bookworm AS builder
RUN corepack enable
# Install these packages for compiling canvas
RUN \
apt-get update && \
apt-get install -y \
build-essential \
libcairo2-dev \
libjpeg-dev \
libpango1.0-dev \
libgif-dev \
g++ \
python3 && \
apt-get autoremove && apt-get clean
# Set the working directory
WORKDIR /app
COPY package.json pnpm-lock.yaml ./
# Install dependencies
RUN pnpm install
FROM node:22-bookworm-slim AS runner
WORKDIR /app
RUN \
apt update \
&& apt install -y \
net-tools \
nano \
curl \
&& apt autoremove && apt clean
COPY --from=builder /app /app
# Bundle app source
COPY . .
ENV ACCOUNT_ADDRESS=0x0
ENV ACCOUNT_PK=0x0
ENV STORAGE_DIR="/app/storage"
ENV WEB_DIR="/app/web"
# Define the command to run your app using CMD which defines your runtime
CMD [ "node","--experimental-strip-types", "src/index.ts" ]