Code Monkey home page Code Monkey logo

docker-script-find-latest-image-tag's Introduction

Hi there ๐Ÿ‘‹

โšก Fun fact: ๐ŸŽ‰ Ansible 2.9 is amazing! ๐ŸŽ‰

๐Ÿ‘พ ๐Ÿ‘พ ๐Ÿ‘พ ๐Ÿ‘พ

docker-script-find-latest-image-tag's People

Contributors

ryandaniels avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

docker-script-find-latest-image-tag's Issues

use RepoTags field from `docker image inspect` to get associated tags/versions for an image

Hi, I was reading your blog post that goes with this script. If you wanted to get the version associated with an image that is also tagged 'latest', you should be able to do the following...

IMAGEID=sha_of_image
docker image inspect $IMAGEID  | jq -r '.[].RepoTags'

for example, when I do this on a postgres image I have, I get the following...

[
  "postgres:13.2",
  "postgres:latest"
]

Note, this works on most 'mainstream' (ie popular) images as its considered a best practice. If the maintainer doesn't full that, then your script will be needed to try and figure out what 'latest' is.

https://index.docker.io/v2 requests authentication

https://index.docker.io/v2 requests authentication

For example the command:

./docker_image_find_tag.sh -n portainer -i 5526251cc61f -f 2.13. -l 10 -v

outputs:

Using IMAGE_NAME: portainer
Using REGISTRY: https://index.docker.io/v2
Found Image ID Source: sha256:5526251cc61f126f2c1da1875aae113c9af05a5679123dde2f6c15d12754b103

Error 401 from: https://index.docker.io/v2/library/portainer/tags/list
HTTP_BODY: {"errors":[{"code":"UNAUTHORIZED","message":"authentication required","detail":[{"Type":"repository","Class":"","Name":"library/portainer","Action":"pull"}]}]}

`parse error: Invalid numeric literal at line 2, column 4`

I'm trying to use docker_image_find_tag.sh, and can't get it to work even with one of your examples:

$ docker_image_find_tag.sh -n traefik -i 96c63a7d3e50 -f 1.7. -l 10 -v
Using IMAGE_NAME: traefik
Using REGISTRY: https://index.docker.io/v2
parse error: Invalid numeric literal at line 2, column 4

I'm running this on a Windows 10 system, using Ubuntu via WSL 2.

At first the script failed because jq wasn't recognized, but once I installed that I couldn't get any further than the error above.

CURL_AUTH error

I got the error when execute this command. thanks!

sh docker_image_find_tag.sh -n mongo -i 87f1a6e84e00

docker_image_find_tag.sh: line 175: CURL_AUTH[@]: unbound variable

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.