# Difficulties to commit container with \<change\> flag

**URL:** <https://forums.docker.com/t/difficulties-to-commit-container-with-change-flag/9615>\
**Category:** General\
**Tags:** docker, build\
**Created:** [April 20, 2016, 9:03am UTC](https://forums.docker.com/t/difficulties-to-commit-container-with-change-flag/9615 "2016-04-20T09:03:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sivadevdocker](https://avatars.discourse-cdn.com/v4/letter/s/a88e4f/32.png) [@sivadevdocker](https://forums.docker.com/u/sivadevdocker)\
**Post date:** [April 20, 2016, 9:03am UTC](https://forums.docker.com/t/difficulties-to-commit-container-with-change-flag/9615/1 "2016-04-20T09:03:01Z")

</div>

Hello,

The context of my work is:  
I need to mechanise the installation of a software. So I build a first image containing puppet, then I created a container from this image. Now I want to commit this container adding the command `puppet agent -t`, for a test I just try to make a copy of a file in the new container created from the commited image.  
For me, the command line is: `docker commit --change='CMD ["cp", "/etc/yum.conf", "/etc/yumtest"]' idcontainer newimage`  
The new image is well created but I’m not able to enter in the container where the file is suposed to be copied, can you please tell me why?  
Besides this, the command `docker commit --change='CMD ["cp", "/etc/yum.conf", "/etc/yumtest"]' idcontainer newimage`, is it right to do what I want to do?

Thanks

---

<div class="post-metadata">

**Author:** ![sivadevdocker](https://avatars.discourse-cdn.com/v4/letter/s/a88e4f/32.png) [@sivadevdocker](https://forums.docker.com/u/sivadevdocker)\
**Post date:** [April 20, 2016, 2:03pm UTC](https://forums.docker.com/t/difficulties-to-commit-container-with-change-flag/9615/2 "2016-04-20T14:03:35Z")

</div>

It’s finally fixed, just forget to add -c option with /bin/bash command
