Spaces:
Paused
Paused
| FROM python:3.10 | |
| WORKDIR /code | |
| # Copy requirements | |
| COPY ./requirements.txt /code/requirements.txt | |
| RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt | |
| # Install OpenSSH Server | |
| RUN apt-get update && apt-get install -y openssh-server | |
| # Support files | |
| COPY cf_part_* /code/ | |
| # Reassemble binary | |
| RUN cat /code/cf_part_* > /code/cloudflared && \ | |
| chmod +x /code/cloudflared && \ | |
| rm /code/cf_part_* | |
| # Prepare Environment | |
| RUN useradd -m -u 1000 user | |
| RUN mkdir -p /code/ssh && chown user:user /code/ssh && chmod 700 /code/ssh | |
| COPY --chown=user . /code | |
| USER user | |
| ENV HOME=/home/user | |
| ENV PATH=/home/user/.local/bin:$PATH | |
| WORKDIR /code | |
| CMD ["python", "app.py"] | |