baoyin2024 commited on
Commit
4215a8b
·
verified ·
1 Parent(s): 5c841e4

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +2 -10
Dockerfile CHANGED
@@ -1,8 +1,6 @@
1
  FROM node:18-alpine
2
-
3
  # Set user to root for installation
4
  USER root
5
-
6
  # Arguments that can be passed at build time
7
  ARG N8N_PATH=/usr/local/lib/node_modules/n8n
8
  ARG BASE_PATH=/root/.n8n
@@ -26,7 +24,6 @@ ARG DB_POSTGRESDB_DATABASE=$DB_POSTGRESDB_DATABASE
26
  ARG DB_POSTGRESDB_PORT=$DB_POSTGRESDB_PORT
27
  ARG DB_POSTGRESDB_USER=$DB_POSTGRESDB_USER
28
  ARG DB_POSTGRESDB_PASSWORD=$DB_POSTGRESDB_PASSWORD
29
-
30
  # Install system dependencies
31
  RUN apk add --no-cache \
32
  git \
@@ -40,27 +37,22 @@ RUN apk add --no-cache \
40
  chromium \
41
  postgresql-client \
42
  ffmpeg \
 
43
  ttf-dejavu \ # 可选:添加一些默认字体
44
  yt-dlp
45
  # Install custom fonts
46
  RUN mkdir -p /usr/share/fonts/truetype/custom
47
  COPY ./fonts/HanyiSentyPagoda_Regular.ttf /usr/share/fonts/truetype/custom/
48
  RUN fc-cache -f -v
49
-
50
  # Set environment variables
51
  ENV PUPPETEER_SKIP_DOWNLOAD=true
52
  ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser
53
-
54
  # Install n8n globally
55
- RUN npm install -g [email protected]
56
-
57
  # Create necessary directories
58
  RUN mkdir -p $DATABASE_PATH $CONFIG_PATH $WORKFLOWS_PATH $LOGS_PATH \
59
  && chmod -R 777 $BASE_PATH
60
-
61
  # Set working directory
62
  WORKDIR /data
63
-
64
  # Start n8n
65
-
66
  CMD ["n8n", "start"]
 
1
  FROM node:18-alpine
 
2
  # Set user to root for installation
3
  USER root
 
4
  # Arguments that can be passed at build time
5
  ARG N8N_PATH=/usr/local/lib/node_modules/n8n
6
  ARG BASE_PATH=/root/.n8n
 
24
  ARG DB_POSTGRESDB_PORT=$DB_POSTGRESDB_PORT
25
  ARG DB_POSTGRESDB_USER=$DB_POSTGRESDB_USER
26
  ARG DB_POSTGRESDB_PASSWORD=$DB_POSTGRESDB_PASSWORD
 
27
  # Install system dependencies
28
  RUN apk add --no-cache \
29
  git \
 
37
  chromium \
38
  postgresql-client \
39
  ffmpeg \
40
+ fontconfig \ # 关键:添加 fontconfig
41
  ttf-dejavu \ # 可选:添加一些默认字体
42
  yt-dlp
43
  # Install custom fonts
44
  RUN mkdir -p /usr/share/fonts/truetype/custom
45
  COPY ./fonts/HanyiSentyPagoda_Regular.ttf /usr/share/fonts/truetype/custom/
46
  RUN fc-cache -f -v
 
47
  # Set environment variables
48
  ENV PUPPETEER_SKIP_DOWNLOAD=true
49
  ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser
 
50
  # Install n8n globally
51
+ RUN npm install -g [email protected]
 
52
  # Create necessary directories
53
  RUN mkdir -p $DATABASE_PATH $CONFIG_PATH $WORKFLOWS_PATH $LOGS_PATH \
54
  && chmod -R 777 $BASE_PATH
 
55
  # Set working directory
56
  WORKDIR /data
 
57
  # Start n8n
 
58
  CMD ["n8n", "start"]