Tagging docker images

Normally with “docker build . ” you get docker id that you can run with “docker run DOCKERID” but if you want a bit more friendly name you can tag it like this:

docker build -t YOURDOCKERUSERNAME/PROJECT:latest .

After that you can refer to the image with the tag instead of id like this

docker run -p 8081:8081 YOURDOCKERUSERNAME/PROJECT

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s