dockerfile-image-tags

command module
v1.3.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 7, 2021 License: ISC Imports: 7 Imported by: 0

README

dockerfile-image-tags

version semantic versioning

test

List or query images and tags used in a Dockerfile.

Usage

List all images and tags

Pass path to Dockerfile:

dockerfile-image-tags path/to/Dockerfile

Or pass Dockerfile as input:

cat path/to/Dockerfile | dockerfile-image-tags

Sample output (JSON):

[{"name":"golang","tag":"1.17.0-alpine"},{"name":"common","tag":"?"},{"name":"common","tag":"?"},{"name":"common","tag":"?"},{"name":"viaductoss/ksops","tag":"v3.0.0"},{"name":"quay.io/argoproj/argocd","tag":"$ARGOCD_VERSION"}]
Find single image tag

Pass -q (--query) to return tag for first occurrence of image with specified name:

dockerfile-image-tags -q golang path/to/Dockerfile

Pass -n (--occurrence) to return specified occurrence instead of first occurrence. For example, to return tag for second FROM golang:

dockerfile-image-tags -q golang -n 2 path/to/Dockerfile

Sample output:

1.17.0-alpine

Docker image

See shivjm/dockerfile-image-tags packages.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL