Hi my docker image build throws up the following error
[+] Building 0.0s (2/2) FINISHED
=> ERROR [internal] load build definition from Dockerfile 0.0s
=> ERROR [internal] load .dockerignore 0.0s
------
> [internal] load build definition from Dockerfile:
------
------
> [internal] load .dockerignore:
------
failed to solve with frontend dockerfile.v0: failed to read dockerfile: failed to create lease: write /var/lib/docker/buildkit/containerdmeta.db: read-only file system
This is my Dockerfile
FROM python:3.10.5
WORKDIR /app
COPY requirements.txt .
COPY app.py .
COPY main.py .
RUN pip install -r requirements.txt
COPY . .
CMD ["python", "app.py"]
I have tried many solutions but nothing works. Any idea how to resolve this isse?
2
Answers
I got the same error
failed to solve the frontend docker file.v0: was unable to read docker file: failed to create lease: read-only file system
Solution:
Finally, It worked for me.
I had this same issue when trying to build a Dockerfile from Windows Powershell ISE as I was working on a script. When I actually opened a Powershell shell and ran the same script then everything worked fine.