Skip to content

Commit eff1deb

Browse files
committed
fix docker build bug
1 parent ab5ef7b commit eff1deb

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
FROM python:3.10.7-bullseye as build
22

3+
RUN mkdir -p /builddir
4+
WORKDIR /builddir
35
COPY ./ ./
46
RUN pip install -r requirements-test.txt
57
RUN python -m build
@@ -18,7 +20,8 @@ RUN useradd --uid 1000 --create-home --shell /bin/bash nonroot
1820
USER nonroot
1921
ENV PATH "$PATH:/home/nonroot/.local/bin"
2022

21-
COPY --from=build /dist/jsonparse-${VERSION}-py3-none-any.whl ./
23+
WORKDIR /home/nonroot
24+
COPY --from=build /builddir/dist/jsonparse-${VERSION}-py3-none-any.whl ./
2225
RUN pip install --user jsonparse-${VERSION}-py3-none-any.whl[webapi]
2326

2427
CMD ["sh", "-c", "exec gunicorn -b 0.0.0.0:${PORT:-8000} jsonparse.webapi:app"]

0 commit comments

Comments
 (0)