|
FROM ubuntu:22.04 |
|
|
|
ENV DEBIAN_FRONTEND=noninteractive |
|
|
|
|
|
RUN apt update && apt install -y \ |
|
tzdata \ |
|
iproute2 \ |
|
net-tools \ |
|
curl \ |
|
iptables \ |
|
ca-certificates \ |
|
sudo \ |
|
python3 \ |
|
python3-pip \ |
|
&& ln -fs /usr/share/zoneinfo/Etc/UTC /etc/localtime \ |
|
&& echo "Etc/UTC" > /etc/timezone \ |
|
&& dpkg-reconfigure -f noninteractive tzdata \ |
|
&& rm -rf /var/lib/apt/lists/* |
|
|
|
|
|
RUN useradd -m -s /bin/bash user && \ |
|
echo 'user:yourpassword' | chpasswd && \ |
|
echo 'user ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers |
|
|
|
|
|
RUN curl -fsSL https://tailscale.com/install.sh | sh |
|
|
|
|
|
RUN pip3 install flask gunicorn |
|
|
|
|
|
WORKDIR /app |
|
|
|
|
|
COPY app.py /app |
|
COPY run.sh /app |
|
RUN chmod +x /app/run.sh |
|
|
|
|
|
EXPOSE 7860 |
|
|
|
|
|
CMD ["/app/run.sh"] |