Files
n8n-ffmpeg-proxy/Dockerfile
2026-01-22 05:18:38 +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 alpine:3.19 AS base
# Аргументы для настройки
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 \
nodejs \
npm \
&& 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"]