Dani
Dani

Reputation: 21

How to run versioned images of docker with nexus?

I am currently generating images of docker and upload them to Nexus Repository Manager, but always the same image: latest image, I would like to have a versioned of images. What dou you recommend?

Upvotes: 0

Views: 266

Answers (2)

Adonis Murati
Adonis Murati

Reputation: 1659

The versions you are refering to are Docker tags.

This can be done in two ways:

docker build -t username/image_name:tag_name .

or

docker tag SOURCE_IMAGE[:TAG] TARGET_IMAGE[:TAG]

Upvotes: 1

Alassane Ndiaye
Alassane Ndiaye

Reputation: 4777

You should use:

docker build -t name:version

Upvotes: 1

Related Questions