File size: 1,072 Bytes
f1487e0
5ae7e18
f1487e0
5ae7e18
f1487e0
 
 
 
 
 
 
 
 
 
 
 
b8cbde0
f1487e0
 
 
151fa0c
5ae7e18
f1487e0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b8cbde0
 
 
 
cb1e487
 
 
f1487e0
 
 
5ae7e18
f1487e0
 
151fa0c
f1487e0
151fa0c
5ae7e18
f1487e0
 
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
54
55
56
57
58
59
# FROM node:latest

# RUN apt-get update && apt-get install -y build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev && apt-get clean

# WORKDIR /app

# COPY package.json .

# RUN npm i

# COPY . .

# EXPOSE 7860

# CMD ["npm", "start"]
# Use the Node.js 20 alpine image as the base image
# Use the Node.js 20 alpine image as the base image
FROM node:20-alpine3.16

# Set the working directory
WORKDIR /app

# Copy the application files to the container
ADD . /app

# Install necessary packages
RUN apk add --no-cache \
    font-noto \
    font-noto-cjk \
    font-noto-extra \
    gcompat \
    libstdc++ \
    libuuid \
    vips-dev \
    build-base \
    jpeg-dev \
    pango-dev \
    cairo-dev \
    imagemagick \
    libssl1.1 \
    giflib-dev \
    librsvg-dev \
    cairo \
    pango \
    fontconfig \
    ttf-freefont

# Install npm dependencies
RUN npm install

# Link the resolver library
RUN ln -s /lib/libresolv.so.2 /usr/lib/libresolv.so.2

# Expose the application port
EXPOSE 7860

# Start the application
CMD ["npm", "start"]