DockerHub image copy error

Hi All,

I am trying to check the integration of OpenNebula 6.8.0 CE with DockerHub and Firecracker.

After enabling the DockerHub marketplace I can see DockerHub images listed.
When I try to download one, the docker image fails to be copied to the image datastore, with the error:

Error response from daemon: No such image: nginx:latest Error copying Error copying docker://nginx?size=3072&filesystem=ext4&format=raw&tag=alpine to /var/lib/one//datastores/1/a3b636a12427fdc81a9f4ea39d8529ad

The docker image is pulled locally and not sure why it is trying to copy a different tag (nginx:latest instead of nginx:alpine).

The same error occurs when I attempt this image creation from command line as below:

sudo -u oneadmin oneimage create --name nginx-dh --path 'docker://nginx?size=3072&filesystem=ext4&format=raw&tag=alpine' --datastore 1

I have checked also Docker Image copying image in the datastore topic and have confirmed that I have docker installed and docker.io package also. Also the image datastore I am using is the default from a clean installation as below:

DATASTORE 1 INFORMATION
ID             : 1
NAME           : default
USER           : oneadmin
GROUP          : oneadmin
CLUSTERS       : 0
TYPE           : IMAGE
DS_MAD         : fs
TM_MAD         : ssh
BASE PATH      : /var/lib/one//datastores/1
DISK_TYPE      : FILE
STATE          : READY

DATASTORE CAPACITY
TOTAL:         : 196.3G
FREE:          : 102.2G
USED:          : 85.1G
LIMIT:         : -

PERMISSIONS
OWNER          : um-
GROUP          : u--
OTHER          : ---

DATASTORE TEMPLATE
ALLOW_ORPHANS="YES"
CLONE_TARGET="SYSTEM"
DISK_TYPE="FILE"
DS_MAD="fs"
LN_TARGET="SYSTEM"
RESTRICTED_DIRS="/"
SAFE_DIRS="/var/tmp"
TM_MAD="ssh"
TYPE="IMAGE_DS"

Also I have set oneadmin as a member of the docker group and I can run docker commands as oneadmin user.

Any ideas what I might be missing?


Versions:
OpenNebula 6.8.0 CE

Sounds like a combination of bugs that were fixed on 6.8.1. To fix them you can replace /var/lib/one/remotes/datastore/docker_downloader.sh with the master version.

Hi, copied the file from master branch and now I got a different error . Below is the full error log.

Mon Jul 1 12:26:10 2024 : Error copying image in the datastore: INFO: cp: Copying local image docker://nginx?size=2048&filesystem=ext4&format=raw&tag=stable-alpine3.19 to the image repository ERROR: cp: Command "set -e -o pipefail; /var/lib/one/remotes/datastore/fs/../downloader.sh 'docker://nginx?size=2048&filesystem=ext4&format=raw&tag=stable-alpine3.19' '/var/lib/one//datastores/1/3cbf0c34c9c8bf14df2e563bff90d491'" failed: #0 building with "default" instance using docker driver #1 [internal] load build definition from dockerfile #1 transferring dockerfile: 1.81kB done #1 DONE 0.0s #2 [internal] load .dockerignore #2 transferring context: 2B done #2 DONE 0.0s #3 [internal] load metadata for docker.io/library/nginx:stable-alpine3.19 #3 DONE 0.0s #4 [internal] load build context #4 DONE 0.0s #5 [ 1/16] FROM docker.io/library/nginx:stable-alpine3.19 #5 DONE 0.0s #4 [internal] load build context #4 transferring context: 2.25MB 0.1s done #4 DONE 0.1s #5 [ 1/16] FROM docker.io/library/nginx:stable-alpine3.19 #5 DONE 0.1s #6 [ 2/16] COPY context /root/context #6 DONE 0.1s #7 [ 3/16] RUN apk add coreutils openrc udev openssh #7 0.437 fetch https://dl-cdn.alpinelinux.org/alpine/v3.19/main/x86_64/APKINDEX.tar.gz #7 5.443 fetch https://dl-cdn.alpinelinux.org/alpine/v3.19/community/x86_64/APKINDEX.tar.gz #7 5.444 WARNING: updating and opening https://dl-cdn.alpinelinux.org/alpine/v3.19/main: temporary error (try again later) #7 10.45 WARNING: updating and opening https://dl-cdn.alpinelinux.org/alpine/v3.19/community: temporary error (try again later) #7 10.45 ERROR: unable to select packages: #7 10.45 coreutils (no such package): #7 10.45 required by: world[coreutils] #7 10.45 openrc (no such package): #7 10.45 required by: world[openrc] #7 10.45 openssh (no such package): #7 10.45 required by: world[openssh] #7 10.45 udev (no such package): #7 10.45 required by: world[udev] #7 ERROR: process "/bin/sh -c apk add coreutils openrc udev openssh" did not complete successfully: exit code: 4 ------ > [ 3/16] RUN apk add coreutils openrc udev openssh: 10.45 WARNING: updating and opening https://dl-cdn.alpinelinux.org/alpine/v3.19/community: temporary error (try again later) 10.45 ERROR: unable to select packages: 10.45 coreutils (no such package): 10.45 required by: world[coreutils] 10.45 openrc (no such package): 10.45 required by: world[openrc] 10.45 openssh (no such package): 10.45 required by: world[openssh] 10.45 udev (no such package): 10.45 required by: world[udev] ------ dockerfile:16 -------------------- 15 | COPY context /root/context 16 | >>> RUN apk add coreutils \ 17 | >>> openrc \ 18 | >>> udev \ 19 | >>> openssh 20 | RUN apk -U add haveged -------------------- ERROR: failed to solve: process "/bin/sh -c apk add coreutils openrc udev openssh" did not complete successfully: exit code: 4 Error copying Error copying docker://nginx?size=2048&filesystem=ext4&format=raw&tag=stable-alpine3.19 to /var/lib/one//datastores/1/3cbf0c34c9c8bf14df2e563bff90d491

Thanks.

Looks like a temporary error when installing the context package dependencies from the alpine mirrors. Do you get the same error again ?

Yes I get such errors from multiple attempts and using different images (nginx, fluentd, etc) from the store.

Looks more docker related than OpenNebula related

[ 3/16] RUN apk add coreutils openrc udev openssh #7 0.437 fetch https://dl-cdn.alpinelinux.org/alpine/v3.19/main/x86_64/APKINDEX.tar.gz #7 5.443 fetch https://dl-cdn.alpinelinux.org/alpine/v3.19/community/x86_64/APKINDEX.tar.gz #7 5.444 WARNING: updating and opening https://dl-cdn.alpinelinux.org/alpine/v3.19/main: temporary error (try again later) #7 10.45 WARNING: updating and opening https://dl-cdn.alpinelinux.org/alpine/v3.19/community: temporary error (try again later) #7 10.45 ERROR: unable to select packages: #7 10.45 coreutils (no such package): #7 10.45 required by: world[coreutils] #7 10.45 openrc (no such package): #7 10.45 required by: world[openrc] #7 10.45 openssh (no such package): #7 10.45 required by: world[openssh] #7 10.45 udev (no such package): #7 10.45 required by: world[udev] #7 ERROR: process “/bin/sh -c apk add coreutils openrc udev openssh” did not complete successfully: exit code:

During the docker build process the container image is not able to install packages from the alpine repo. I can’t reproduce this.