Build new image from exist container does not work

Dear friends, I pulled ubuntu image and install a few packages, then I re-create it to be a new image for my personal.
Command I use and ok:
docker commit 7d41cb72d4eb mymod/monitor:v1

Show images:
REPOSITORY TAG IMAGE ID CREATED SIZE mymod/monitor v1 f6274b03f326 18 seconds ago 1.074 GB

Then I make a container from it
docker run --name TEST -p 81:80 -d mymod/monitor:v1

Check: docker ps -a, it does not work
root@docker:~# docker ps -a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 9b0a4880cf6d mymod/monitor:v1 "/bin/bash" About a minute ago Exited (0) 2 seconds ago ABC

In the syslog, I see the log show:
Feb 25 15:30:31 docker kernel: [18460.074083] aufs au_opts_verify:1612:docker[2063]: dirperm1 breaks the protection by the permission bits on the lower branch Feb 25 15:30:31 docker kernel: [18460.092737] aufs au_opts_verify:1612:docker[2063]: dirperm1 breaks the protection by the permission bits on the lower branch Feb 25 15:30:31 docker kernel: [18460.106146] aufs au_opts_verify:1612:docker[2052]: dirperm1 breaks the protection by the permission bits on the lower branch Feb 25 15:30:31 docker kernel: [18460.109648] device veth59689a4 entered promiscuous mode Feb 25 15:30:31 docker kernel: [18460.172996] eth0: renamed from veth981576d Feb 25 15:30:31 docker kernel: [18460.189288] docker0: port 1(veth59689a4) entered forwarding state Feb 25 15:30:31 docker kernel: [18460.189293] docker0: port 1(veth59689a4) entered forwarding state Feb 25 15:30:31 docker kernel: [18460.238590] veth981576d: renamed from eth0 Feb 25 15:30:31 docker kernel: [18460.276797] docker0: port 1(veth59689a4) entered disabled state Feb 25 15:30:31 docker kernel: [18460.277042] device veth59689a4 left promiscuous mode Feb 25 15:30:31 docker kernel: [18460.277043] docker0: port 1(veth59689a4) entered disabled state

Document for this, I followed https://docs.oracle.com/cd/E52668_01/E54669/html/section_c5q_n2z_fp.html

Please help me. Thank you very much!

Bump up this thread, please help me!

What does docker logs of the container say? Without that information we cannot help you.

It looks like the container is using /bin/bash as the command to execute so it’s probably not using the correct command.

If you read the linked Oracle documentation, it looks like you are missing the end piece of this line (/usr/sbin/httpd -D FOREGROUND):

docker run -d --name newguest -p 8080:80 mymod/httpd:v1 /usr/sbin/httpd -D FOREGROUND

That is probably your issue.

Here is command I run for initial docker container

docker run --name TEST -v /docker/VPS/observium:/opt/observium -v /docker/VPS/mysql:/var/lib/mysql -p 81:80 -d quang/manual-observium:u14.04.4

With /docker/VPS/observium: place contains source codes
With /docker/VPS/mysql: place contains database files

In the docker I build apache and mysql together. I’m using Ubuntu and I don’t see any log out, /var/log/upstart/docker.log is empty with 0 bytes

Screenshot: http://s33.postimg.org/a9x7lo5bz/A_nh_chu_p_Ma_n_hi_nh_2016_05_24_lu_c_16_10_53.png

========

So, if I want to run it, I must go for 3 step
docker run --name TEST -v /docker/VPS/observium:/opt/observium -v /docker/VPS/mysql:/var/lib/mysql -p 81:80 -it quang/manual-observium:u14.04.4 /bin/bash
exit
docker start YAN