Skip to content

Commit 84c6243

Browse files
committed
change: use alpine image
1 parent 97629a2 commit 84c6243

1 file changed

Lines changed: 6 additions & 7 deletions

File tree

docker/fastapi/Dockerfile

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
1-
FROM python:3.14.0-slim
1+
FROM python:3.14.0-alpine
22

3+
ENV PYTHONUNBUFFERED=1
34
ENV UV_HOME="/root/.uv"
45
ENV PATH="/root/.uv:${PATH}"
56

6-
EXPOSE 8000
7-
8-
RUN apt-get update && apt-get install -y curl
7+
RUN apk add --no-cache curl gcc musl-dev libffi-dev
98

109
WORKDIR /fastapi-mongodb
1110

12-
RUN curl -LsSf https://astral.sh/uv/install.sh | env UV_INSTALL_DIR="${UV_HOME}" sh
11+
RUN curl -LsSf https://astral.sh/uv/install.sh | env UV_INSTALL_DIR=${UV_HOME} sh
1312

1413
COPY . .
1514

16-
RUN uv sync
15+
RUN uv sync --frozen --group dev
1716

18-
CMD ["uv", "run", "fastapi", "dev", "app/main.py", "--host", "0.0.0.0"]
17+
CMD uv run fastapi dev app/main.py --host ${BACKEND_HOST} --port ${BACKEND_PORT}

0 commit comments

Comments
 (0)