Files
n8n-ffmpeg-proxy/Dockerfile
drholy 651d6e7217
All checks were successful
Build, Push and Redeploy Docker Image / build-and-push (push) Successful in 4m59s
add access rule to user node for folder /home/node/*
2026-01-26 22:39:31 +07:00

36 lines
1.1 KiB
Docker
Raw Permalink 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
RUN mkdir -p /home/node/.n8n && chown -R node:node /home/node
# Копирование скрипта и установка прав
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"]