Files
n8n-ffmpeg-proxy/Dockerfile
drholy 9908a5b2e0
All checks were successful
Build, Push and Redeploy Docker Image / build-and-push (push) Successful in 5m10s
test fix
2026-01-26 22:08:05 +07:00

35 lines
1.0 KiB
Docker
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
FROM node:23-alpine
# Аргументы для настройки
ARG N8N_VERSION=latest
ARG SOCKS_IP=192.168.31.240
# Установка зависимостей и n8n в одном слое
RUN apk add --no-cache \
ffmpeg \
curl \
wget \
iptables \
redsocks \
gnupg \
netcat-openbsd \
npm \
# su-exec \
&& npm install -g n8n@${N8N_VERSION} \
&& rm -rf /var/cache/apk/*
# Создание пользователя и домашней директории
#RUN adduser -D -s /bin/sh node && mkdir -p /home/node/.n8n
# Копирование скрипта и установка прав
COPY start-n8n.sh /start.sh
RUN chmod +x /start.sh
# Настройка redsocks.conf с использованием аргумента
RUN echo "base { log_debug = off; log_info = on; log = stderr; daemon = off; redirector = iptables; } redsocks { local_ip = 127.0.0.1; local_port = 12345; ip = ${SOCKS_IP}; port = 1080; type = socks5; }" > /etc/redsocks.conf
USER node
WORKDIR /home/node
EXPOSE 5678
ENTRYPOINT ["/start.sh"]