Skip to content

Commit

Permalink
fix: Provide libc for pydantic
Browse files Browse the repository at this point in the history
Fixes:

```
ImportError: Error loading shared library libgcc_s.so.1: No such file or
directory (needed by
/app/.venv/lib/python3.10/site-packages/pydantic_core/_pydantic_core.cpython-310
-x86_64-linux-gnu.so)
```

Suppose that with pydantic v2 and its Rust core,
Alpine + musl doesn't cut it anymore
  • Loading branch information
alexpovel committed May 1, 2024
1 parent 9f5ebdd commit 49a91f9
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,15 @@ COPY . .

RUN poetry install --only main

FROM python:3.10-alpine
FROM python:3.10

ARG WORKDIR

WORKDIR ${WORKDIR}

COPY --from=builder ${WORKDIR} .

# For options, see https://boxmatrix.info/wiki/Property:adduser
RUN adduser app -DHh ${WORKDIR} -u 1000
RUN useradd -u 1000 -d ${WORKDIR} -M app
USER 1000

# App-specific settings:
Expand Down

0 comments on commit 49a91f9

Please sign in to comment.