2

For a cron job triggered script, I have used python:3.6.8-slim as a base image for my script to run.

The script runs every hour and does so successfully until the docker system prune job runs.

After that, the script fails to pull the image with the message "ERROR: error pulling image configuration: unknown blob"

When rebuilding and pushing the image to the registry again, the docker pull command runs without any problems until the prune job.

I am using sonatype nexus3 as my private docker registry.

I do not understand why the docker system prune job is causing this behaviour since the registry nexus3 is running in its very own container.

my cron job:

30      *       *       *       *       docker pull my.registry.com/path/name:tag && docker run --rm my.registry.com/path/name:tag

my dockerfile:

FROM python:3.6.8-slim
WORKDIR /usr/src/app
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
COPY ./ ./src/
CMD ["python", "src/myscript.py"]
Theo
  • 2,262
  • 3
  • 23
  • 49

0 Answers0