update base image, smaller image type (alpine)
Some checks failed
Docker build and publish / build-and-push-image (push) Has been cancelled
Some checks failed
Docker build and publish / build-and-push-image (push) Has been cancelled
This commit is contained in:
parent
f4159bc30d
commit
07518a1f8f
1 changed files with 12 additions and 3 deletions
13
Dockerfile
13
Dockerfile
|
|
@ -1,10 +1,19 @@
|
|||
FROM python:3
|
||||
FROM python:3.13.11-alpine3.23 AS builder
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
RUN apk add --no-cache gcc g++ musl-dev rust cargo patchelf
|
||||
|
||||
COPY requirements.txt ./
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
|
||||
|
||||
FROM python:3.13.11-alpine3.23
|
||||
|
||||
COPY --from=builder /usr/local/lib/python3.13/site-packages /usr/local/lib/python3.13/site-packages
|
||||
RUN apk add --no-cache libstdc++
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
COPY . .
|
||||
|
||||
CMD [ "python", "-u", "./main.py" ]
|
||||
Loading…
Add table
Add a link
Reference in a new issue