FROM python:3.9.16 | |
ENV DEBIAN_FRONTEND=noninteractive \ | |
TZ=Europe/Paris | |
# BEGIN root part | |
# Setup tailscale | |
WORKDIR /bin | |
ENV TSFILE=tailscale_1.38.2_amd64.tgz | |
RUN wget https://pkgs.tailscale.com/stable/${TSFILE} && \ | |
tar xzf ${TSFILE} --strip-components=1 | |
RUN mkdir -p /var/run && ln -s /tmp/tailscale /var/run/tailscale && \ | |
mkdir -p /var/cache && ln -s /tmp/tailscale /var/cache/tailscale && \ | |
mkdir -p /var/lib && ln -s /tmp/tailscale /var/lib/tailscale && \ | |
mkdir -p /var/task && ln -s /tmp/tailscale /var/task/tailscale | |
# Install socat | |
RUN apt-get update && apt-get -y install socat | |
# User | |
RUN useradd -m -u 1000 user | |
USER user | |
ENV HOME=/home/user \ | |
PATH=/home/user/.local/bin:$PATH | |
WORKDIR /home/user/app | |
COPY --link --chown=1000 ./ $HOME/app | |
ENTRYPOINT $HOME/app/startup.sh | |