简体   繁体   中英

Docker compose vs docker start

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?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM