skip to Main Content

Ubuntu – How to get the image name and version from manifest.json

This is a manifest.json generated by "docker save" on Ubuntu: [ { "Config":"a5a29aeb4d6a28cb5a0b759572ae5696f0a99a4be39aa4de08d8a897e6d12b95.json", "RepoTags":["hello/world:latest"], "Layers":["b0e93b0b2e63771ea0cd34f350681b4397c804e5ed5ba01aec23cfaf6c49bc51/layer.tar","f9b7caaf240b159e636f77a9571073f6e4d5a0541d864ec64e4e2808b282e302/layer.tar","1355029c32eee25981e17b0e89e946d9346cffdff29ff53858104ebfe6728d80/layer.tar","362092bb6a9ed18c0e88a9b1635e7c16914661935ce64f1b581d19fd5226463a/layer.tar","fe2bde379de2f44bb47d5d75a25294485f70d8b4c7a99a08b0fcef8f4076914d/layer.tar","4acfd2b9473bf5c17f50ad2ff04c148b1be79d1174509e0fb10d27ba8cff9294/layer.tar","e5131e82e66e45e002a88618254c1cde43a497d8a94fcb5d9b20171f19b15b96/layer.tar"] } ] I want to use "jq" to get the docker image name and version from "RepoTags": jq -e -r ".RepoTags" manifest.json Here is the…

VIEW QUESTION

Ubuntu – Execute bash script in Docker Container using CMD command

Dockerfile: FROM ubuntu:latest ARG DEBIAN_FRONTEND=nointerative WORKDIR /var/photogram COPY . . RUN chmod +x /var/photogram/install.sh CMD /var/photogram/install.sh install.sh: #!/bin/bash echo "hello world" touch hello.txt touch sad.txt Structure of files: Tholkappiar2003@docker:~/docker$ tree . ├── Dockerfile └── install.sh 1 directory, 2 files Docker…

VIEW QUESTION
Back To Top
Search