ewolff/microservice

vagrant and docker

Closed this issue · 1 comments

Hi,

I tried to do what you did, but failed on the following command:
vagrant provision

The problem is, that vagrant says:

The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

      rm -f /var/lib/vagrant/cids/9ecc8459ea5f39f9da55cb4d71a70b5d1e0f0b80
      docker run --cidfile=/var/lib/vagrant/cids/9ecc8459ea5f39f9da55cb4d71a70b5d1e0f0b80 -d --name frontend --restart=always -p 8090:8090 -v /frontend:/frontend frontend

Stdout from the command:

Stderr from the command:

stdin: is not a tty
docker: Error response from daemon: Conflict. The name "/frontend" is already in use by container e3ae5840fdda3a5532ccbf5c6e26cf69069053997d45ea1a8f94addd56710f47. You have to remove (or rename) that container to be able to reuse that name..
See 'docker run --help'.

Vagrant removes the cid, bu des not remove the named container.
Do you know why?

I did the following:

  • Use vagrant box updateto ensure I have the latest base box installed
  • Ran vagrant up
  • Check whether the application is there - it was.
  • Ran vagrant haltto stop the VM
  • Ran vagrant up
  • Check whether the application is there - it was.
  • Ran mvn clean packageto update the application
  • Ran vagrant provision to update the Docker containers in the Vagrant VM.
  • The Docker containers were updated as expected and the application works.

So I am not sure why you see the problem mentioned above. I have clarified the documentation and will close the issue because I cannot reproduce it. Please reopen if the problem persists.