Giter Site home page Giter Site logo

symnixhq / symnix-image-scraper Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 10 KB

A script to get the latest Docker image tags for various projects from Docker Hub.

Python 100.00%
docker docker-compose dockerimages image scraper tags version versioning imagetags

symnix-image-scraper's Introduction


This repository contains a Python3 script which we use internally as a microservice to get the latest image versions of various Docker images as a human readable version from Docker Hub.


๐Ÿ“ƒ Requirements

  1. Python3 installation is required (Script is tested with version >= 3.11)
  2. Run pip install -r requirements.txt to install the python3 requirements

โšก๏ธ Usage

  1. Define your images for which you need the information in the services.json file A example configuration could look like this:

     [
       {
         "name": "linuxserver/bookstack"
       },
       {
         "name": "nginx"
       },
       {
         "name": "postgres"
       },
       {
         "name": "rocketchat/rocket.chat"
       }
     ]
  2. Make sure the script has the correct permissions:

    chmod +x docker_image_scraper.py
  3. Run the script:

    python3 docker_image_scraper.py
  4. A successful result in the all_tags.json could look like this, for example:

    {
    "nginx": [
        {
            "version": "1.25.4",
            "major": "1"
        },
        {
            "version": "1.25.3",
            "major": "1"
        },
        {
            "version": "1.25.2",
            "major": "1"
        },
        {
            "version": "1.25.1",
            "major": "1"
        },
        {
            "version": "1.25.0",
            "major": "1"
        }
    ],
    "postgres": [
        {
            "version": "16.2",
            "major": "16"
        },
        {
            "version": "16.1",
            "major": "16"
        },
        {
            "version": "16.0",
            "major": "16"
        },
        {
            "version": "16",
            "major": "16"
        },
        {
            "version": "15.6",
            "major": "15"
        }
    ],
    "linuxserver/bookstack": [
        {
            "version": "23.12.20240115",
            "major": "23"
        },
        {
            "version": "23.12.20240108",
            "major": "23"
        },
        {
            "version": "23.12.20231229",
            "major": "23"
        },
        {
            "version": "23.12.2",
            "major": "23"
        },
        {
            "version": "23.12.1",
            "major": "23"
        }
    ],
    "rocketchat/rocket.chat": [
        {
            "version": "6.6.0",
            "major": "6"
        },
        {
            "version": "6.5.3",
            "major": "6"
        },
        {
            "version": "6.5.2",
            "major": "6"
        },
        {
            "version": "6.5.1",
            "major": "6"
        },
        {
            "version": "6.5.0",
            "major": "6"
        }
      ]
    }

There are currently two attributes for each image in the all_tags.json output. The version attribute describes the respective human-readable Docker image version found and major indicates the major version on which the respective tag is based on.

๐Ÿ—บ๏ธ Roadmap

One of the most important features we are planning to implement is an API interface to use the output from the script with other applications. The option to store the result in a .json file will remain in the future.

We are also planning to variablize stuff like how many versions it stores for a docker image.

๐Ÿ‘ Contribute

See Contributing.

โš ๏ธ License

GPLv3

symnix-image-scraper's People

Contributors

xfuture603 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

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.