ERROR: Unable to read database state: No such file or directory I was trying to install Photon by pulling the docker image. But when I run docker build -t photon . I am getting the below error.

 ---&gt; Running in 3076fb42ef8b
ERROR: Unable to read database state: No such file or directory
ERROR: Failed to open apk database: No such file or directory
The command '/bin/sh -c apk add git &amp;&amp; git clone https://github.com/s0md3v/Photon.git Photon' returned a non-zero code: 99


I observed the same error before when I tried to install some other application. So, I am guessing this is not something specific to Photon. What is causing this error? How to fix this?
Please try splitting this line:

RUN apk add git &amp;&amp; git clone https://github.com/s0md3v/Photon.git Photon

into two:

RUN apk add git

RUN git clone https://github.com/s0md3v/Photon.git Photon


This will tell you exactly which piece of the command fails. If it is the apk add git part maybe try this: RUN apk update &amp;&amp; apk add git.

Also you may fixing to a specific tag in the FROM python:3-alpine as 3-alpine follows the latest alpine release which may have some unknown/unfixed issues.

See https://hub.docker.com/_/python/ for available tags.