Pushing an image to Dockerhub makes it available in a wider variety of contexts because other sources can pull it down. Later in this series I'm going to talk about using Docker images for AWS Fargate tasks, and I need to make the Docker image available in a public registry for that.
I'm definitely doing things here and there in these tutorials that might be immediately unnecessary, but are laying groundwork for future tutorials.
But if I use docker hub to build my images, other sources can pull it down too right? Or am I wrong about that? :s
I'm talking about this: docs.docker.com/docker-hub/builds/
Oh, I completely misunderstood your comment. Sorry!
There's no reason you couldn't build an image from a github or bitbucket repository, but part of the point of this tutorial is to introduce Dockerhub as a concept, and this is a simpler, more isolated experience, in my opinion. If you are already using Docker and building images from a source control integration, you're probably more advanced than the target audience for this tutorial :)
Additionally, it seemed a bit complicated to add another integration into this tutorial. It would have gotten overly long. But Using docker hub to build images from an external repository makes a lot of sense, especially if you anticipate the code changing a lot. Both are valid ways to go about things.
Nice write-up :)
Why push an image and not use the docker hub functionality to build images? Is there a specific reason for that?
Pushing an image to Dockerhub makes it available in a wider variety of contexts because other sources can pull it down. Later in this series I'm going to talk about using Docker images for AWS Fargate tasks, and I need to make the Docker image available in a public registry for that.
I'm definitely doing things here and there in these tutorials that might be immediately unnecessary, but are laying groundwork for future tutorials.
But if I use docker hub to build my images, other sources can pull it down too right? Or am I wrong about that? :s
I'm talking about this: docs.docker.com/docker-hub/builds/
Oh, I completely misunderstood your comment. Sorry!
There's no reason you couldn't build an image from a github or bitbucket repository, but part of the point of this tutorial is to introduce Dockerhub as a concept, and this is a simpler, more isolated experience, in my opinion. If you are already using Docker and building images from a source control integration, you're probably more advanced than the target audience for this tutorial :)
Additionally, it seemed a bit complicated to add another integration into this tutorial. It would have gotten overly long. But Using docker hub to build images from an external repository makes a lot of sense, especially if you anticipate the code changing a lot. Both are valid ways to go about things.
Thanks! I know docker hub, but a Dockerfile I need to look up everything, so I'm not that advanced :)