# Docker-compose images in GitHub CI/CD

**URL:** <https://hub.mender.io/t/docker-compose-images-in-github-ci-cd/6708>\
**Category:** General Discussions\
**Tags:** docker, update-modules\
**Created:** [April 5, 2024, 2:52pm UTC](https://hub.mender.io/t/docker-compose-images-in-github-ci-cd/6708 "2024-04-05T14:52:20Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![GoethalsRobbe](https://avatars.discourse-cdn.com/v4/letter/g/50afbb/32.png) [@GoethalsRobbe](https://hub.mender.io/u/GoethalsRobbe)\
**Post date:** [April 5, 2024, 2:52pm UTC](https://hub.mender.io/t/docker-compose-images-in-github-ci-cd/6708/1 "2024-04-05T14:52:20Z")

</div>

Hi all!

As an evaluation of the complete Mender platform, I am trying some workflows as they would have been implemented in a production environment, which is not (yet) the case at this moment.  
Using multiple of the docs, tutorials and blog posts, I created an easy device onboarding script which installs the mender-client4, mender-update etc.

The most important way of updating our software would be using a docker-compose file in which containers are added/removed or where container versions are altered.  
Using the ‘Tutorial: Docker Compose update’, I was able to do a first test doing so using Mender. The tutorial walked me to all the steps smoothly, **thanks** for that!

However, I was wondering why the exact images included in the docker-compose file, also have to be mentioned in the `app-gen` command using `--image` parameter? I took this example from the tutorial:

```auto
app-gen
        -- <other params>
        -- image docker.io/library/traefik:v2.9 \	# This is mentioned already in the docker-compose file
        -- image docker.io/traefik/whoami:latest \ # This is mentioned already in the docker-compose file
        -- <other params>

```

To take it a step further, I also took a look at CI/CD integration. I have a working draft version which simply builds the docker-compose file and uploads the artifact to the Mender platform.  
However, I had to hard-code the ‘–image’ parameters in the CI/CD yaml. For me to be useful, it would make sense if the `--image` parameters are dropped and the artifact is generated from the descriptions in the docker-compose alone.

Am I missing something obvious here?

Cheers!

---

<div class="post-metadata">

**Author:** ![TheYoctoJester](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/theyoctojester/32/1444_2.png) [@TheYoctoJester](https://hub.mender.io/u/TheYoctoJester)\
**Post date:** [April 6, 2024, 6:30pm UTC](https://hub.mender.io/t/docker-compose-images-in-github-ci-cd/6708/2 "2024-04-06T18:30:29Z")

</div>

Hi @GoethalsRobbe,

Thanks a lot for getting in touch, and glad to hear the module is working so well for you. After looking at the [`app-gen` source code](https://github.com/mendersoftware/app-update-module/blob/master/gen/app-gen), I don’t think the automatic extraction of the image list is currently supported. I’d think that at least for simpler manifests, this should be doable. For more complex setups, I can’t tell (not much of a container guy, sorry).  
I personally would just grab the `app-gen` source and extend it as required for your use case. It is by no means set in stone.

Greets,  
Josef

---

<div class="post-metadata">

**Author:** ![GoethalsRobbe](https://avatars.discourse-cdn.com/v4/letter/g/50afbb/32.png) [@GoethalsRobbe](https://hub.mender.io/u/GoethalsRobbe)\
**Post date:** [April 8, 2024, 6:50am UTC](https://hub.mender.io/t/docker-compose-images-in-github-ci-cd/6708/3 "2024-04-08T06:50:00Z")

</div>

Hi Josef

Thanks for taking a look.  
I’ll see what I can do to include this feature.

Kind regards  
Robbe

---

<div class="post-metadata">

**Author:** ![GoethalsRobbe](https://avatars.discourse-cdn.com/v4/letter/g/50afbb/32.png) [@GoethalsRobbe](https://hub.mender.io/u/GoethalsRobbe)\
**Post date:** [April 9, 2024, 9:47am UTC](https://hub.mender.io/t/docker-compose-images-in-github-ci-cd/6708/4 "2024-04-09T09:47:17Z")

</div>

As a reference for future readers: automatic image extraction from the docker-compose.yaml file is now included in the app-gen script.

Thanks to @peter for the quick review and merge! 👍

---

<div class="post-metadata">

**Author:** ![peter](https://avatars.discourse-cdn.com/v4/letter/p/278dde/32.png) [@peter](https://hub.mender.io/u/peter)\
**Post date:** [April 9, 2024, 11:18am UTC](https://hub.mender.io/t/docker-compose-images-in-github-ci-cd/6708/5 "2024-04-09T11:18:16Z")

</div>

amazin work man!

pg
