Added a basic dockerfile
This commit is contained in:
2
.dockerignore
Normal file
2
.dockerignore
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
.git
|
||||||
|
Dockerfile
|
||||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -196,3 +196,4 @@ $RECYCLE.BIN/
|
|||||||
|
|
||||||
# Windows shortcuts
|
# Windows shortcuts
|
||||||
*.lnk
|
*.lnk
|
||||||
|
.python-version
|
||||||
|
|||||||
16
Dockerfile
Normal file
16
Dockerfile
Normal 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"]
|
||||||
Reference in New Issue
Block a user