downfb / Dockerfile
nicholaslewishub5884's picture
Update Dockerfile
6e048f1 verified
raw
history blame contribute delete
927 Bytes
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"]