# How to add multiple containers in mender layer

**URL:** <https://hub.mender.io/t/how-to-add-multiple-containers-in-mender-layer/6050>\
**Category:** Yocto Project\
**Tags:** yocto, nxp, docker, kirkstone\
**Created:** [July 31, 2023, 11:56am UTC](https://hub.mender.io/t/how-to-add-multiple-containers-in-mender-layer/6050 "2023-07-31T11:56:51Z")\
**Posts on this page:** 1\
**Showing post:** 8

<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:** [August 7, 2023, 5:49am UTC](https://hub.mender.io/t/how-to-add-multiple-containers-in-mender-layer/6050/8 "2023-08-07T05:49:24Z")

</div>

Hi @Aysha ,

I think you are randomly mixing up things, and therefore they do not work. By custom image, we understand a full linux root filesystem including your modifications. So, the command style `mender-artifact write rootfs-image` only applies if you have this. The filename `docker-container.tar` sounds very different. So, it does not apply here!

The `docker-artifact-gen` script is suitable for packing docker containers into a Mender artifact. Please use it, and please, read the tutorial. It expects the name (and optionally tag) of the container, not an archive. The [corresponding section](https://hub.mender.io/t/docker/324#artifact-creation-8) explains the required arguments in detail.

Greetz,  
Josef

---

_[View the full topic](https://hub.mender.io/t/how-to-add-multiple-containers-in-mender-layer/6050)._
