How do I restart a container with a new spring-boot JAR?

ok, we need to override the entrypoint to get to the commandline

use -it --entrypoint /bin/bash (as well as the rest of the parms)

jdev@vmd23690:~$ sudo docker run -it --entrypoint /bin/bash -v /home/jdev/test:/tmp -p 8888:8080 --name ca_spring_boot ca_app_image
root@4cf2ab796835:/# ls
bin  boot  dev  etc  home  lib  lib64  media  mnt  opt  proc  root  run  sbin  srv  sys  tmp  usr  var
root@4cf2ab796835:/# cd tmp
root@4cf2ab796835:/tmp# ls
ca.jar
root@4cf2ab796835:/tmp# exit
exit

jdev@vmd23690:~$ sudo docker logs ca_spring_boot
root@4cf2ab796835:/# ls
bin  boot  dev  etc  home  lib  lib64  media  mnt  opt  proc  root  run  sbin  srv  sys  tmp  usr  var
root@4cf2ab796835:/# cd tmp
root@4cf2ab796835:/tmp# ls
ca.jar
root@4cf2ab796835:/tmp# exit
exit
jdev@vmd23690:~$

The container did not start. (((

it DID start, its sitting at a commandline… u typed exit to leave it…

and, in the /tmp folder is a jar file, call ca.jar
but your command is looking for /tmp/app.jar

1 Like

Ahhhhhh, I’m blind. Everything works, though it does not respond to requests, but this is something else, or something I did not see. This is different. Thank you so much!

Hello, jwebdev

I can reproduce this with Compose 1.1.0-rc1 and Docker 1.4.1 on Ubuntu 14.04 under certain condition real-world not understand yet:

Using a real world example, the containers will come up after restarting the docker service, but they will not come up after rebooting the host. After a reboot, the manually started services lost their restarting characteristics as well:

With Mindmajix Docker Training, experience the Real-time implementation of Docker projects by exploring different features of Installing Ubuntu Linux and CentOS Linux, Granting Docker Control to Non-root Users, Docker Containers, Network Configuration Files, Dockerfile Instructions, Docker Info. etc.