portainer: Unable to tag image - "invalid reference format"

Bug description

Unable to tag and push an image to my private registry endpoint.

Expected behavior

The image tagging should succeed so I can then push my image.

Steps to reproduce the issue:

  1. portainer/#/images/sha256:IMAGE-SHA
  2. Attempt to tag the image
  3. Be prompted with error “invalid reference format”

Technical details:

Portainer version:

1.23.0

Docker version (managed by Portainer):

Standalone 1.12.6

Platform:

Red Hat Enterprise Linux Server release 5.3 (Tikanga)
Amazon Linux Bare Metal release 2012.03

Command used to start Portainer (docker run -p 9000:9000 portainer/portainer):

docker run \
--name portainer \
--restart always \
--detach \
--volume /var/run/docker.sock:/var/run/docker.sock \
--volume /path/to/portainer/ssl:/certs \
--volume portainer_data:/data \
--network web_network \
--ip 10.1.0.3 \
--expose 8000 \
--expose 9000 \
custom.registry/portainer:latest \
--ssl \
--sslcert /certs/portainer.crt \
--sslkey /certs/portainer.key

Browser:

Firefox Developer Edition - 71.0b12 (64-bit)

Additional context

Checking my portainer container logs produced:

2019/12/04 23:01:08 [WARN] [docker,snapshot] [message: unable to snapshot engine version] [endpoint: Desktop] [err: Error response from daemon: client is newer than server (client API version: 1.40, server API version: 1.24)]

I made sure my registry:2 container was up to date, which it was.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 20 (4 by maintainers)

Commits related to this issue

Most upvoted comments

First off I know this is a closed issue and I’m not here to re-open it or fuss.

I wanted to drop a line for a few reasons.

  1. It was really great to see that you took in my issue as a customer, took the time to understand my issue, reproduce the issue, and attempt to solve the issue.
  2. You tracked the issue using excellent tagging and board usage. That’s great.
  3. You clearly laid out how you determined to drop support for this given issue. Having that clear set boundary is so much nicer than “meh we didn’t feel like it” or “I don’t like that API” etc.
  4. You didn’t make me feel stupid at any point. Even when I associated an unrelated issue by my mistake.

This really increased my confidence with the portainer project. Thank you for your contributions.

Closing as we support N-2 versions of docker so API 1.38 and above.

Unrelated to #3534

This API operation allows us to add a tag (like CLI docker tag) on docker environment.

As you are running docker 1.12.6 (relased 2017-01-10), per matrix the API version of your env is 1.24 .

Version 1.40 (current latest docker API version) : https://docs.docker.com/engine/api/v1.40/#operation/ImageTag

Version 1.24 (yours) : 2019-12-09-180436_1920x1080_scrot As showed, the route didn’t change between API 1.40 and 1.24 but the underlying evaluation may have changed.

Previously we were using the old format (repo + tag) but to fix bugs and reduce code complexity we were forced to use the “repo” param alone, including the tag in it, instead of splitting the tag from the repository name. From tests, this way of doing (using repo alone instead of repo + tag) is working on 1.39+ APIs, but seems not to be working in previous versions (idk the exact version where repo + tag evaluation changed, but seems to be after 1.24).