pup-fileserver / Dockerfile
liquidcarbon
pup play
cd5decf
raw
history blame contribute delete
597 Bytes
#### Base OS ####
FROM debian:latest AS base
RUN apt-get update \
&& apt-get install -y curl \
&& apt-get clean
# Create user
RUN useradd -m -u 1000 user
USER user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:/home/user/.pixi/bin:$PATH \
PUP=/home/user/pup
WORKDIR $HOME
CMD ["bash"]
#### Puppy ####
FROM base AS puppy
COPY --chown=user pup .
RUN $PUP
RUN pup py3.11
RUN pup fetch appenv fastapi uvicorn itables
COPY --chown=user main.py .
EXPOSE 7860
CMD ["pup", "play"]
# same as CMD ["appenv/.venv/bin/uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]