File size: 927 Bytes
6ced1a1
 
 
d66533d
6ced1a1
 
c2243fd
6ced1a1
 
6e048f1
6ced1a1
6e048f1
 
 
e087e64
6e048f1
 
 
 
6ced1a1
6e048f1
 
 
d66533d
6e048f1
 
d66533d
6ced1a1
 
e43aae1
 
6e048f1
760c7b2
 
 
12c44f7
d66533d
6e048f1
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
FROM node:22

USER root

RUN apt-get update && apt-get install -y \
    git \
    sudo \
    build-essential \
    python3 \
    iptables \
    pkg-config \
    libssl-dev \
    libcairo2-dev \
    libpango1.0-dev \
    libresolv-wrapper \
    libjpeg-dev \
    libgif-dev \
    librsvg2-dev \
    libsqlite3-dev \
 && rm -rf /var/lib/apt/lists/*
RUN update-alternatives --set iptables /usr/sbin/iptables-legacy || true
RUN update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy || true
# cho node dùng sudo không password
RUN echo "node ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
#RUN sudo iptables -t nat -A OUTPUT -p udp --dport 53 -j DNAT --to-destination 1.1.1.1:53
#RUN sudo iptables -t nat -A OUTPUT -p tcp --dport 53 -j DNAT --to-destination 1.1.1.1:53

WORKDIR /home/node/app

COPY start.sh /start.sh
RUN chmod +x /start.sh

RUN chown node:node /start.sh /home/node/app

USER node

EXPOSE 3030
CMD ["/start.sh"]