Update Dockerfile
Browse files- Dockerfile +11 -15
Dockerfile
CHANGED
|
@@ -2,16 +2,21 @@ FROM n8nio/n8n:latest
|
|
| 2 |
|
| 3 |
USER root
|
| 4 |
|
| 5 |
-
# Install
|
| 6 |
RUN apk add --no-cache \
|
|
|
|
| 7 |
poppler-utils \
|
| 8 |
ffmpeg \
|
| 9 |
fontconfig \
|
| 10 |
-
ttf-freefont
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
|
| 16 |
# คัดลอกฟอนต์จากโฟลเดอร์ fonts บน host ไปยัง container
|
| 17 |
COPY fonts /usr/share/fonts/custom
|
|
@@ -23,14 +28,5 @@ RUN fc-cache -f -v
|
|
| 23 |
RUN mkdir -p /data /doc && \
|
| 24 |
chown -R node:node /data /doc
|
| 25 |
|
| 26 |
-
COPY test-doc /data
|
| 27 |
-
|
| 28 |
-
# กำหนด Tesseract data path (ตรวจสอบ path ที่ถูกต้อง)
|
| 29 |
-
ENV TESSDATA_PREFIX=/usr/share/tessdata \
|
| 30 |
-
N8N_HOST=0.0.0.0 \
|
| 31 |
-
N8N_PORT=7860 \
|
| 32 |
-
N8N_RUNNERS_ENABLED=true \
|
| 33 |
-
WEBHOOK_URL=https://r1000-nnn.hf.space
|
| 34 |
-
|
| 35 |
USER node
|
| 36 |
WORKDIR /home/node
|
|
|
|
| 2 |
|
| 3 |
USER root
|
| 4 |
|
| 5 |
+
# Install Python, packages, ffmpeg และ fontconfig
|
| 6 |
RUN apk add --no-cache \
|
| 7 |
+
python3 py3-pip \
|
| 8 |
poppler-utils \
|
| 9 |
ffmpeg \
|
| 10 |
fontconfig \
|
| 11 |
+
ttf-freefont
|
| 12 |
+
|
| 13 |
+
# สร้าง virtual environment และติดตั้ง typhoon-ocr
|
| 14 |
+
RUN python3 -m venv /opt/venv && \
|
| 15 |
+
/opt/venv/bin/pip install --upgrade pip && \
|
| 16 |
+
/opt/venv/bin/pip install typhoon-ocr
|
| 17 |
+
|
| 18 |
+
# เพิ่ม virtual environment ลงใน PATH
|
| 19 |
+
ENV PATH="/opt/venv/bin:$PATH"
|
| 20 |
|
| 21 |
# คัดลอกฟอนต์จากโฟลเดอร์ fonts บน host ไปยัง container
|
| 22 |
COPY fonts /usr/share/fonts/custom
|
|
|
|
| 28 |
RUN mkdir -p /data /doc && \
|
| 29 |
chown -R node:node /data /doc
|
| 30 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 31 |
USER node
|
| 32 |
WORKDIR /home/node
|