I am working with an image called tensort built using my local docker daemon. This is the command I am using to push the image.
$ docker push della/tensort:latest
But how does it work in devops teams of a few developers, if someone wants to work with others’ image? How does the image name (della/tensort:latest
in my case) look like? Should the image contain the user name of the developer who pushed it, like a git commit?
3
Answers
Yes, to answer your question, if you were to be working on someone else’s docker container image, you would want to pull it onto your local machine using
(In your case, your co-developers need to use "della/tensort:latest" to pull the image)
For more details on the options and their uses, kindly refer to the documentation below.
https://docs.docker.com/engine/reference/commandline/pull/
The image name would typically the name of the organization that owns it, like a GitHub repository. If your source code is in
https://github.com/examplecom/tensort
then you’d typically build an imageexamplecom/tensort
.Remember that a Docker image is immutable and contains a built copy of your application; the only thing you can really do with an image is run it. If you want to publish built images to your colleagues you can, and if your organization permits you could use your personal Docker Hub account for it. In my current role I rarely check out other developers’ source-control branches (though it happens) and basically never try to run their prebuilt images.
Docker hub has the concept of teams and organizations.
You typically would use those to work across teams. For example, your company has an organization with the same name as the company, then you have multiple teams under that organization and can add employees of your company to the individual teams with certain permissions such as read and write.