# Strategy for Distributing my solution

**URL:** <https://forums.docker.com/t/strategy-for-distributing-my-solution/29095>\
**Category:** General\
**Tags:** docker\
**Created:** [March 1, 2017, 8:40pm UTC](https://forums.docker.com/t/strategy-for-distributing-my-solution/29095 "2017-03-01T20:40:19Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![vikceo](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/vikceo/32/14452_2.png) [@vikceo](https://forums.docker.com/u/vikceo)\
**Post date:** [March 1, 2017, 8:40pm UTC](https://forums.docker.com/t/strategy-for-distributing-my-solution/29095/1 "2017-03-01T20:40:20Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![nathanleclaire](https://avatars.discourse-cdn.com/v4/letter/n/ebca7d/32.png) [@nathanleclaire](https://forums.docker.com/u/nathanleclaire)\
**Post date:** [March 1, 2017, 9:36pm UTC](https://forums.docker.com/t/strategy-for-distributing-my-solution/29095/2 "2017-03-01T21:36:28Z")

</div>

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):

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

```

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

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

```

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

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

```

---

<div class="post-metadata">

**Author:** ![vikceo](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/vikceo/32/14452_2.png) [@vikceo](https://forums.docker.com/u/vikceo)\
**Post date:** [March 1, 2017, 10:12pm UTC](https://forums.docker.com/t/strategy-for-distributing-my-solution/29095/3 "2017-03-01T22:12:06Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![nathanleclaire](https://avatars.discourse-cdn.com/v4/letter/n/ebca7d/32.png) [@nathanleclaire](https://forums.docker.com/u/nathanleclaire)\
**Post date:** [March 1, 2017, 10:29pm UTC](https://forums.docker.com/t/strategy-for-distributing-my-solution/29095/4 "2017-03-01T22:29:14Z")

</div>

> [@vikceo](#):
>
> if i m updating the image then why does it require a new docker-compose file?

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.

---

<div class="post-metadata">

**Author:** ![vikceo](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/vikceo/32/14452_2.png) [@vikceo](https://forums.docker.com/u/vikceo)\
**Post date:** [March 1, 2017, 10:36pm UTC](https://forums.docker.com/t/strategy-for-distributing-my-solution/29095/5 "2017-03-01T22:36:16Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![nathanleclaire](https://avatars.discourse-cdn.com/v4/letter/n/ebca7d/32.png) [@nathanleclaire](https://forums.docker.com/u/nathanleclaire)\
**Post date:** [March 1, 2017, 10:39pm UTC](https://forums.docker.com/t/strategy-for-distributing-my-solution/29095/6 "2017-03-01T22:39:46Z")

</div>

> [@vikceo](#):
>
> i do not have those repositories setup and can not use docker public registry as well. So, basically, my image is local.

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.

> [@vikceo](#):
>
> 1. does this sounds right or totally weird to not have repository ?

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

> [@vikceo](#):
>
> how to handle future updates in this scenario

I don’t understand.

---

<div class="post-metadata">

**Author:** ![vikceo](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/vikceo/32/14452_2.png) [@vikceo](https://forums.docker.com/u/vikceo)\
**Post date:** [March 2, 2017, 4:23am UTC](https://forums.docker.com/t/strategy-for-distributing-my-solution/29095/7 "2017-03-02T04:23:41Z")

</div>

> [@nathanleclaire](#):
>
> 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.

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

---

<div class="post-metadata">

**Author:** ![nathanleclaire](https://avatars.discourse-cdn.com/v4/letter/n/ebca7d/32.png) [@nathanleclaire](https://forums.docker.com/u/nathanleclaire)\
**Post date:** [March 2, 2017, 7:12pm UTC](https://forums.docker.com/t/strategy-for-distributing-my-solution/29095/8 "2017-03-02T19:12:48Z")

</div>

> [@vikceo](#):
>
> 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.

---

<div class="post-metadata">

**Author:** ![vikceo](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/vikceo/32/14452_2.png) [@vikceo](https://forums.docker.com/u/vikceo)\
**Post date:** [March 3, 2017, 2:14am UTC](https://forums.docker.com/t/strategy-for-distributing-my-solution/29095/9 "2017-03-03T02:14:35Z")

</div>

> [@nathanleclaire](#):
>
> $ docker stack deploy -c docker-compose-new.yml vikceostack

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?

---

<div class="post-metadata">

**Author:** ![nathanleclaire](https://avatars.discourse-cdn.com/v4/letter/n/ebca7d/32.png) [@nathanleclaire](https://forums.docker.com/u/nathanleclaire)\
**Post date:** [March 3, 2017, 7:03pm UTC](https://forums.docker.com/t/strategy-for-distributing-my-solution/29095/10 "2017-03-03T19:03:20Z")

</div>

> [@vikceo](#):
>
> 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.

---

<div class="post-metadata">

**Author:** ![vikceo](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/vikceo/32/14452_2.png) [@vikceo](https://forums.docker.com/u/vikceo)\
**Post date:** [March 3, 2017, 7:04pm UTC](https://forums.docker.com/t/strategy-for-distributing-my-solution/29095/11 "2017-03-03T19:04:35Z")

</div>

> [@nathanleclaire](#):
>
> 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.

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

---

<div class="post-metadata">

**Author:** ![nathanleclaire](https://avatars.discourse-cdn.com/v4/letter/n/ebca7d/32.png) [@nathanleclaire](https://forums.docker.com/u/nathanleclaire)\
**Post date:** [March 3, 2017, 7:11pm UTC](https://forums.docker.com/t/strategy-for-distributing-my-solution/29095/12 "2017-03-03T19:11:34Z")

</div>

> [@vikceo](#):
>
> 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 😉 [GitHub - moby/moby: The Moby Project - a collaborative project for the container ecosystem to assemble container-based systems](https://github.com/docker/docker)

But playing with `docker stack` and `docker service` ([docker service | Docker Docs](https://docs.docker.com/engine/reference/commandline/service/)) should give you quite a feel for it.
