Amol
Amol

Reputation: 475

Adding Custom Manifest file with Docker image/tag

Like we can add our own custom manifest file in Jar files. is there a way to add Custom Manifest in Docker images/tags. Like If I want to add all the JIRA ids fixed in a release can I add those to manifest file for that tag

Thanks, Amol

Upvotes: 0

Views: 789

Answers (1)

William Martins
William Martins

Reputation: 2067

Well, to Docker containers, you can add any arbitrary files with ADD or COPY commands.

So, you can write a script (a bash script, for example) that gets the JIRA ids, creates a manifest file (JIRA-IDs.manifest, for example). Then, in your build script, you'll generate this file and, in your Dockerfile, just add:

COPY JIRA-IDs.manifest /

If you'll need to process this manifest data, it's a good idea to create it in a "parser friendly" format, like json, csv, line separated, space separated, etc.

After doing this, you can get the contents of JIRA-IDs.manifest that's running inside the container using docker exec, for example.

Of course, if you're using a programming language / framework that allow you to do that, do it so. Otherwise, you can always "go by scratch", creating a manual file like that.

Hope it helps!

Upvotes: 1

Related Questions