File size: 1,226 Bytes
e5a41ef
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
FROM buildpack-deps:22.04-curl

ENV DEBIAN_FRONTEND=noninteractive \
    TZ=Asia/Ho_Chi_Minh \
    PORT=5678 \
    USER=koga \
    HOME=home/koga

USER root

RUN useradd -m -u 1000 koga

RUN apt-get update && apt-get install -y --no-install-recommends \
    bash \
    unzip \
    git \
    git-lfs \
    curl \
    sudo \
    wget \
    ffmpeg \
    psmisc \
    aria2 \
    build-essential \
    libnss3-dev \
    libgdk-pixbuf2.0-dev \
    libgtk-3-dev \
    libxss-dev \
    zlib1g-dev \
    libncurses5-dev \
    libssl-dev \
    libreadline-dev \
    libffi-dev \
    libasound2 \
    make \
    libnss3 \
    software-properties-common && \
    rm -rf /var/lib/apt/lists/*
    
RUN curl -sL https://deb.nodesource.com/setup_20.x | sudo -E bash - && \
    apt install nodejs && \
    npm install -g configurable-http-proxy

RUN cd /tmp && \
    wget https://www.python.org/ftp/python/3.10.12/Python-3.10.12.tgz && \
    tar -xf Python-3.10.12.tgz && \
    cd Python-3.10.12 && \
    ./configure --enable-optimizations && \
    make install && \
    cd .. && \
    rm -rf Python-3.10.12 Python-3.10.12.tgz

WORKDIR $HOME

RUN sudo npm install n8n -g
RUN chown -R koga: /home

USER koga

EXPOSE $PORT

CMD ["n8n", "start"]