Rock-ons Problem Installing Old Docker Versions

Hi there,

I apologize if this has already been covered somewhere, but I wasn’t able to find anything specific to this behavior.

I was playing a little bit with OwnCloud and the Rock-Ons utility, I found some problems in the newest version of OC and I trying to install an oldest version, in this specific case the version 10.9.0.

For this case I created a simple json:

{
"1MyNewowncloudHTTPS": {
        "containers": {
            "1MyNewowncloudHTTPS": {
                "image": "owncloud/server",
                "launch_order": 1,
                "ports": {                    
                    "443": {
                        "description": "OwnCloud SSL-WebUI port. Suggested default: 19443",
                        "host_default": 19443,
                        "label": "WebUI port",
                        "ui": true
                    }
                },
                "volumes": {
                    "/var/www/html": {
                        "description": "Choose a Share for OwnCloud. Eg: create a Share called owncloud-all for this purpose alone.",
                        "label": "Storage",
                        "min_size": 1073741824
                    }
                }
            }
        },
        "description": "Secure file sharing and hosting",
        "icon": "https://owncloud.org/wp-content/themes/owncloudorgnew/assets/img/common/logo_owncloud.svg",
        "more_info": "<p>To set up owncloud with SSL check this guide: https://forum.rockstor.com/t/owncloud-ssl-offical-image-guide <br> Please notice, that you can't access the Web-GUI of owncloud before you have completed the setup described in the Guide!</p>",
        "ui": {
            "https": true,
            "slug": ""
        },
        "website": "https://owncloud.org/",
	"version": "10.9.0"
    }
}

I update the rock-on service and all was ok, but my surprise was he installed the newest version of the OwnCloud:

image

So I decided keep the version and include it as a part of the image field:

{
"1MyNewowncloudHTTPS": {
        "containers": {
            "1MyNewowncloudHTTPS": {
                "image": "owncloud/server:10.9.0",
                "launch_order": 1,
                "ports": {                    
                    "443": {
                        "description": "OwnCloud SSL-WebUI port. Suggested default: 19443",
                        "host_default": 19443,
                        "label": "WebUI port",
                        "ui": true
                    }
                },
                "volumes": {
                    "/var/www/html": {
                        "description": "Choose a Share for OwnCloud. Eg: create a Share called owncloud-all for this purpose alone.",
                        "label": "Storage",
                        "min_size": 1073741824
                    }
                }
            }
        },
        "description": "Secure file sharing and hosting",
        "icon": "https://owncloud.org/wp-content/themes/owncloudorgnew/assets/img/common/logo_owncloud.svg",
        "more_info": "<p>To set up owncloud with SSL check this guide: https://forum.rockstor.com/t/owncloud-ssl-offical-image-guide <br> Please notice, that you can't access the Web-GUI of owncloud before you have completed the setup described in the Guide!</p>",
        "ui": {
            "https": true,
            "slug": ""
        },
        "website": "https://owncloud.org/"
        "version": "10.9.0"
    }
}

I update again from the UI and tried to install again and get this error:

[13/Jul/2023 14:18:05] ERROR [storageadmin.views.rockon_helpers:207] Error running a command. cmd = /usr/bin/docker pull owncloud/server:10.9.0:latest. rc = 1. stdout = ['']. stderr = ['invalid reference format', '']
Traceback (most recent call last):
  File "/opt/rockstor/src/rockstor/storageadmin/views/rockon_helpers.py", line 204, in install
    globals().get("{}_install".format(rockon.name.lower()), generic_install)(rockon)
  File "/opt/rockstor/src/rockstor/storageadmin/views/rockon_helpers.py", line 372, in generic_install
    run_command([DOCKER, "pull", image_name_plus_tag], log=True)
  File "/opt/rockstor/src/rockstor/system/osi.py", line 224, in run_command
    raise CommandException(cmd, out, err, rc)
CommandException: Error running a command. cmd = /usr/bin/docker pull owncloud/server:10.9.0:latest. rc = 1. stdout = ['']. stderr = ['invalid reference format', '']
[13/Jul/2023 14:18:05] INFO [storageadmin.tasks:63] Task [install] completed OK

Looks like rockon_helpers.py doesn’t read the object “version” and always pass “latest” to the docker pull command. I’m running on rockstore with this specification:

Operating System: Rockstor built on openSUSE Leap 15.3
CPE OS Name: cpe:/o:opensuse:leap:15.3
Kernel: Linux 6.4.3-lp154.4.g5ab030f-default
Architecture: x86-64

Thanks!

Alejandro L

@Alejandro_Longas_Her in order for changes to your json file to take effect you probably want to run the rockon deletion script first:

poetry run delete-rockon <rockon name>

During the Rockon installation it will use the parameters stored in the Rockstor database, so after deleting the database entries, and selecting the Refresh button on the Rockon page should re-populate those and then hopefully respect the version tag you added.

1 Like

Hi, thanks for your answer, I did it but is the same:

image

Sorry, I should have looked a bit closer at your json. In order to force a particular version you have to add the “tag” element into the json file. So it should look like this:

{
"1MyNewowncloudHTTPS": {
        "containers": {
            "1MyNewowncloudHTTPS": {
                "image": "owncloud/server",
                "tag": "10.9.0",
				"launch_order": 1,
                "ports": {                    
                    "443": {
                        "description": "OwnCloud SSL-WebUI port. Suggested default: 19443",
                        "host_default": 19443,
                        "label": "WebUI port",
                        "ui": true
                    }
                },
                "volumes": {
                    "/var/www/html": {
                        "description": "Choose a Share for OwnCloud. Eg: create a Share called owncloud-all for this purpose alone.",
                        "label": "Storage",
                        "min_size": 1073741824
                    }
                }
            }
        },
        "description": "Secure file sharing and hosting",
        "icon": "https://owncloud.org/wp-content/themes/owncloudorgnew/assets/img/common/logo_owncloud.svg",
        "more_info": "<p>To set up owncloud with SSL check this guide: https://forum.rockstor.com/t/owncloud-ssl-offical-image-guide <br> Please notice, that you can't access the Web-GUI of owncloud before you have completed the setup described in the Guide!</p>",
        "ui": {
            "https": true,
            "slug": ""
        },
        "website": "https://owncloud.org/"
        "version": "10.9.0"
    }
}

The element is described here:

(optional)"tag": "tag of the docker image, if any. latest is used by default.>",

Hope, that will address your needs.

3 Likes