-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add new Dockerfiles (slim and alpine)
- Loading branch information
Showing
6 changed files
with
85 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,17 @@ | ||
FROM python:3.11 | ||
RUN export DEBIAN_FRONTEND=noninteractive \ | ||
&& apt-get update && apt-get install -y xdg-utils \ | ||
&& apt-get clean -y && rm -rf /var/lib/apt/lists/* | ||
FROM python:3.11-alpine | ||
|
||
RUN apk update && \ | ||
apk add --no-cache xdg-utils | ||
|
||
RUN python -m pip install --upgrade pip | ||
|
||
WORKDIR /app | ||
|
||
COPY requirements.txt . | ||
RUN python -m pip install -r requirements.txt | ||
EXPOSE 8000:8000 | ||
|
||
COPY . . | ||
|
||
# Start the app | ||
CMD uvicorn app.main:app --host 0.0.0.0 --port 8000 | ||
EXPOSE 8000:8000 | ||
|
||
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
FROM python:3.11 | ||
RUN export DEBIAN_FRONTEND=noninteractive \ | ||
&& apt-get update && apt-get install -y xdg-utils \ | ||
&& apt-get clean -y && rm -rf /var/lib/apt/lists/* | ||
|
||
RUN python -m pip install --upgrade pip | ||
WORKDIR /app | ||
COPY requirements.txt . | ||
RUN python -m pip install -r requirements.txt | ||
EXPOSE 8000:8000 | ||
COPY . . | ||
|
||
# Start the app | ||
CMD uvicorn app.main:app --host 0.0.0.0 --port 8000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
FROM python:3.11-slim | ||
|
||
RUN export DEBIAN_FRONTEND=noninteractive \ | ||
&& apt-get update && apt-get install -y xdg-utils \ | ||
&& apt-get clean -y && rm -rf /var/lib/apt/lists/* | ||
|
||
RUN python -m pip install --upgrade pip | ||
|
||
WORKDIR /app | ||
|
||
COPY requirements.txt . | ||
RUN python -m pip install -r requirements.txt | ||
|
||
COPY . . | ||
|
||
EXPOSE 8000 | ||
|
||
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters