Docker error of overlay on DevOps used to work earlier

#get python
FROM openjdk:8
COPY --from=python:3.9 / /
##using working directory
WORKDIR /

copy all content from current directory to app

ADD . /

#installing python packages

RUN pip install --trusted-host pypi.org -r requirements.txt
RUN pip install --user traitlets
COPY .databricks-connect /root/
EXPOSE 15005
#getting jdk
CMD [“python”,“run.py”]

the above throws and error of
##[error ]ERROR: failed to solve: cannot replace to directory /var/lib/docker/overlay2/gp102u40agddd@y4d9iqj4pv9/merged/bin with file
#Terror The process /usr/bin/docker’ failed with exit code 1

Help me with it as it is urgent on Production and used to work earlier unable to figure out the error.
Hi @meyay @rimelek

@rimelek Please can you help if you are available

Please format your post according:

Furthermore, provide more context information. We can not guess what you did and how exactly you did it. Remember: answers can only be as good as the question and the information provided with it.

Sorry, but reading an issue is “urgent” is rarely makes me reply faster as everyone’s issue could be urgent. The best way to get quicker responses is

  • taking time to open a topic in the right category so people will not turn around thinking they can’t help with Docker Hub, If it is indeed related to Docker Hub, since you also added “dockerhub” as a tag, please, explain how.
  • choosing the right title, so even the title makes it obvious what “DevOps” you mean
  • and as @meyay pointed out, formatting your post properly. Every technical forum supports code blocks, usually in MarkDown format and you can usually find a button right above the message field and you can immediately see that something is wrong in the preview or after posting the question so you can edit it.
  • Quoting the exact error messages. Is the second one really starts with “Terror”? Possible, but strange. I found it only on stackoverflow, but that was your question too: python - Docker error of overlay on DevOps used to work earlier - Stack Overflow

What you cana lso do is searching for the error message. The part that looks the most relevant part. In your case “failed to solve: cannot replace to directory” or just “cannot replace to directory”, since the rest of the message would be different for everyone.

For example:

It would also be imortant to know how you run the build command and at what point the build fails. We only see (almost) a Dockerfile but the error message should follow the information when the build failed.

Since you add the current directory from the host to the image filesystem’s root, and the error message says:

“cannot replace to directory <path>/bin with file”, you probably have a file in your project root named “bin” probably acidentally created.