简体   繁体   中英

How to Push Two Interconnected Images or a Yaml File to Docker Hub

I'm an absolute beginner to docker hub and am trying to push two images to docker hub. One image is a MySQL database the other is a java war running on tomcat. The second image is an MVC application that links to the first.

I have tried searching for a solution without success.

Thank you,

Wex

Use the stock mysql image for the database; don't try to roll your own database container. Build a custom image (probably based on the stock tomcat image ) and push that to Docker Hub. Add the Dockerfile you used to build the image and the docker-compose.yml that drives the combined application to the root of your repository, next to your pom.xml file, and check them in to source control.

There's no way to push a Docker Compose YAML file or a "combination of multiple images" to Docker Hub in any form, only individual images, so those need to be stored separately.

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