Suddenly my Dockerfile
raised an error:
ERROR: failed to solve: cannot copy to non-directory: /var/lib/docker/overlay2/unmqsp2hwigzv0yjeufoloalx/merged/usr/share/zoneinfo/posix/Africa
My Dockerfile:
FROM python:3.9-slim as build
WORKDIR /app
COPY requirements.txt /requirements.txt
FROM gcr.io/distroless/python3-debian11
COPY . /app
WORKDIR /app
COPY --from=build /app /app
COPY --from=build /usr/local/lib/python3.9/site-packages /usr/lib/python3.9
ENV PYTHONUNBUFFERED=1
EXPOSE 5000
CMD ["src/standalone.py"]
I tried to add below command but an error still occured:
RUN mkdir -p /usr/share/zoneinfo/posix/Africa
Then I tried to modify command which is the source of the error:
FROM: COPY --from=build /usr /usr
TO: COPY --from=build /usr/ /usr/
New contributor
Filip Adamek is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.