0

I created a jhipster application with mysql.It is running.I can add,delete,list some records etc..MySql is running as docker container.With jenkins, I created another docker image which is called jhipster.Now, I can see my docker images with docker images command.I want to start my jhipster application as container but which commmand do I have to use?(docker-compose up -d or docker start containerID)

I have no docker-compose.yml file but I have app.yml file which is generated by jhipster.And app.yml refers mysql.yml file.Now,mysql container is running but there is no container about jhipster.Also, according to my dockerfile,jenkins should create app.war but I cannot find that war in my remote ubuntu machine.From this point,which steps do I should follow? Do you have any idea?

kemal
  • 19
  • 4

1 Answers1

1

The docker cli is used when managing individual containers on a docker engine. It is the client command line to access the docker daemon api.

The docker-compose cli can be used to manage a multi-container application. It also moves many of the options you would enter on the docker run cli into the docker-compose.yml file for easier reuse.

As you have only single container image jhipster, then you should use docker cli to run that image as container.

You can run following command:

docker images

It will give you the name of the image, then run:

docker run image_name:tag_name

If you don't provide any tag name it will run with latest tag

Prafull Ladha
  • 12,341
  • 2
  • 37
  • 58
  • I have also mysql container which is already running.With jenkins, I created a jhipster image.Then , I run docker run containerId but console prints application is running but I have no access in my browser with http://IpAdressMachine:8080 – kemal Jan 04 '19 at 07:32
  • It is working right now with this comamnd : docker run -p 8080:8080 -td imageId.The only problem is that I cannot use mysql container.My tables containes some record but I cannot see these records in UI – kemal Jan 04 '19 at 07:53
  • Please quote and link to sources of content you copy and paste: https://stackoverflow.com/a/37966689/596285 – BMitch Jan 04 '19 at 08:10
  • Could you please share your docker files of mysql and jenkins container? – Prafull Ladha Jan 04 '19 at 08:23