Strategy for Distributing my solution

First of all, I am super new to Docker or container World in general.

So far, I built 2 images (both local and cannot push to hub being internal work)

I created a docker-compose file to be able to run the images in their own containers.

This all works great as expected. Now, the question comes up is how do i deliver it to the consumers so that they can just get it up and running in no time.

The another possible challenge that comes to my mind is: how do i deliver continuous updates to the images so that consumers get it hassle free.

I’d suggest using swarm mode, even with a single node it’d work great.

To deploy it in the first place all you need is Docker >=1.13.0 (I’d recommend the latest):

$ docker stack deploy -c docker-compose.yml vikceostack

To update the image, you could either give them a new Compose file and have them:

$ docker stack deploy -c docker-compose-new.yml vikceostack

or you might be able to update the service image manually as well:

$ docker service update vikceostack_service --image vikceo/image:newtag

if i m updating the image then why does it require a new docker-compose file? that wont change. something in the actual would chage. like for my case my web image also packs the web application. And i may need to just update the application code for some bug fixes or continues enhancements. Sorry may be i am missing something

Because you’d have to change something like image: vikceo/myapp:0.0.1 to image: vikceo/myapp:0.0.2 and apply the change.

so i see a problem here: which I raised in the my original question as well.

i do not have those repositories setup and can not use docker public registry as well. So, basically, my image is local.

I believe in my case when consumer sets up this then they would need to download
2 images files, 1 docker-composer.yml and need to setup docker and do docker stack deploy

Questions

  1. does this sounds right or totally weird to not have repository ?
  2. how to handle future updates in this scenario

You could have a private image that they have access to on Docker Hub, or docker save + docker load the images on your clients’ computers.

A little weird, since you need to get images around somehow, and that somehow is usually via registry.

I don’t understand.

so u r saying i can have a docker repositry which is accessible to me + some users i want ? I thought a docker repository is either purely private to owner or public

Yeah definitely, you can use Docker Hub “groups” concept to authorize only a specific subset of users to have access to a repository. So your users could make Docker Hub accounts (would not cost them anything if you pay for the private repo) and you could add them to this group.

1 Like

does the update to really work require a different docker-compe file as u mentioned a new name? In other words is it smart if i just change the version number in the docker-compose.yml keeping its name same?

Yes, you can make modifications to an existing file and apply them using docker stack deploy. You do not have to have a brand new file with a different name.

1 Like

is there a doc etc that explain how this stack deploy works in terms of what happens behind the scene

If you really want to know, read the source code :wink: GitHub - moby/moby: The Moby Project - a collaborative project for the container ecosystem to assemble container-based systems

But playing with docker stack and docker service (docker service | Docker Docs) should give you quite a feel for it.