-
-
Notifications
You must be signed in to change notification settings - Fork 426
/
Copy pathDockerfile
32 lines (25 loc) · 3.3 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
31
32
# syntax=docker/dockerfile:1
FROM node:lts-bookworm AS builder
WORKDIR /src
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
FROM node:lts-bookworm
WORKDIR /app
COPY package*.json ./
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y libnss3 \
libdbus-1-3 libatk1.0-0 libatk-bridge2.0-0 libxcomposite1 libxdamage1 libxfixes3 libxrandr2 \
libgbm1 libxkbcommon0 libasound2 libcups2 xvfb
ARG SUNO_COOKIE
RUN if [ -z "$SUNO_COOKIE" ]; then echo "Warning: SUNO_COOKIE is not set. You will have to set the cookies in the Cookie header of your requests."; fi
ENV SUNO_COOKIE=${SUNO_COOKIE}
# Disable GPU acceleration, as with it suno-api won't work in a Docker environment
ENV BROWSER_DISABLE_GPU=true
RUN npm install --only=production
# Install all supported browsers, else switching browsers requires an image rebuild
RUN npx playwright install chromium
# RUN npx playwright install firefox
COPY --from=builder /src/.next ./.next
EXPOSE 3000
CMD ["npm", "run", "start"]