Added a basic dockerfile

This commit is contained in:
Donkie committed 2023-04-05 22:09:13 +02:00
1 parent b51d0a3183
commit 77ffab61c5
3 files changed
+19

No files matched your search

+2
View File
@@ -0,0 +1,2 @@
.git
Dockerfile
+1
View File
@@ -196,3 +196,4 @@ $RECYCLE.BIN/
# Windows shortcuts
*.lnk
.python-version
+16
View File
@@ -0,0 +1,16 @@
FROM python:3.11-alpine
# Add local user so we don't run as root
RUN adduser -D app
USER app
ENV PATH="/home/app/.local/bin:${PATH}"
# Copy and install app
COPY --chown=app:app ./ /home/app/spoolman/
WORKDIR /home/app/spoolman
RUN pip install --user .
# Run command
EXPOSE 8000
CMD ["uvicorn", "spoolman.main:app", "--host", "0.0.0.0", "--port", "8000"]