Score:0

Fedora 34 Docker Image failing to build due to Disk I/O error (Digital Ocean App Platform host)

cn flag

I have a Dockerfile which is basically:

# syntax=docker/dockerfile:1
FROM fedora:34
RUN dnf --assumeyes install python3 python3-pip python3-gdal

Which runs fine locally on various host machines. However when Digital Ocean App Platform tries to build the image, the RUN command fails with:

INFO[0012] Running: [/bin/sh -c dnf --assumeyes install python3 python3-pip python3-gdal]
error: sqlite failure: CREATE TABLE IF NOT EXISTS 'Packages' ...: disk I/O error
error: cannot open Packages index using sqlite - No such file or directory (2)
error building image: error building stage: failed to execute command: waiting for process to exit: exit status 1

The only relevant info I could find was an old (2015) bug https://bugzilla.redhat.com/show_bug.cgi?id=1213602 which mentions issues with overlayfs as the configured host layer storage engine ... but all suggested fixes fail such as adding:

RUN touch /var/lib/rpm/*

As the first command.

While I do have a Digital Ocean support ticket open ... it doesn't look like DO will resolve it and it seems like a very odd error for a very simple Dockerfile. The fact it builds fine locally suggests a host config issue?

Has anyone seen this? Is there a common issue with Fedora base images on Docker host providers?

I am stumped. My Google skills have failed me.

Score:1
cn flag

Just a guess but the error seems to affect the sqlite backend used by dnf. This kind of error has something to do with the write on the disk. Have you checked that on this host you have enough disk space allocated to the container runtime, Docker for example. The following command can help checking disk usage.

docker system df

Source

You can also check the space on disk available for example.

df -h /var/lib/docker
cn flag
Yep, I checked with Digital Ocean. An Ubuntu based container with basically the same app works fine too. It is something to do with the container storage backend used by the host.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.