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:
portainer/#/images/sha256:IMAGE-SHA
- Attempt to tag the image
- 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
- fix(snapshots): move the logic from endpoint creation to the first poll EE-4795 (#3432) — committed to chiptus/portainer by andres-portainer a year ago
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.
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) :
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 ofrepo
+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).