File size: 914 Bytes
4f18ea6
 
 
 
b2d79b6
4f18ea6
b2d79b6
 
 
 
 
 
4f18ea6
b2d79b6
 
 
 
 
 
 
 
 
 
 
4f18ea6
b2d79b6
 
4f18ea6
b2d79b6
 
4f18ea6
b2d79b6
4f18ea6
b2d79b6
 
4f18ea6
b2d79b6
 
 
 
 
4f18ea6
b2d79b6
 
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
FROM ubuntu:22.04

ENV DEBIAN_FRONTEND=noninteractive

# Install required packages
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/*

# Create user
RUN useradd -m -s /bin/bash user && \
    echo 'user:yourpassword' | chpasswd && \
    echo 'user ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers

# Install Tailscale
RUN curl -fsSL https://tailscale.com/install.sh | sh

# Install Python dependencies
RUN pip3 install flask gunicorn

# Set working directory
WORKDIR /app

# Copy app files
COPY app.py /app
COPY run.sh /app
RUN chmod +x /app/run.sh

# Expose Flask port
EXPOSE 7860

# Default command
CMD ["/app/run.sh"]