本文介绍了在Docker Hub上共享多容器应用程序的最简单方法是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个完全Docker化的应用程序,具有多种服务:前端,后端,用户服务,多个数据库等...

I have a fully dockerised app with multiple services: frontend, backend, user-service, multiple databases etc...

我使用 docker-compose.yml 文件编排所有内容.我现在正尝试与不具备CS/编码知识的人共享该应用程序,以便他们要做的就是从docker hub拉该应用程序并输入命令 docker-compose up 或类似的命令.

I orchestrate everything using a docker-compose.yml file. I am now trying to share this app with someone who has no CS/coding knowledge so that all they will need to do is pull this app from docker hub and enter the command docker-compose up or something similar.

我正在寻找最好的方法来做,但是我对大量的Docker词汇,捆绑,堆栈,服务等迷茫了……

I'm looking into the best way to do this and I'm getting very lost with the docker lexicon of swarms, bundles, stacks, services etc...

共享以docker-compose.yml文件开头的图像集合的最佳实践是什么?

What is the best practice for sharing a collection of images started with a docker-compose.yml file?

推荐答案

将图像推送到Dockerhub(可能放入私有存储库中).

Push the images to Dockerhub (possibly into a private repository).

将docker-compose.yml文件提供给需要它的人(如果需要,还提供相关的.env文件).

Give the docker-compose.yml file to whoever needs it (along with an associated .env if needed).

让他们登录Docker Hub(即,他们将需要Dockerhub用户并访问您的映像(如果它们位于私有存储库中)

Get them to log in to docker hub (i.e. they'll need a Dockerhub user and access to your images if they are in a private repository)

运行docker-compose up -d

Run docker-compose up -d

这应该是您需要做的,docker-compose应该将图像下拉,而Bob是您的叔叔.

That should be all you need to do, docker-compose should pull the images down and Bob's your uncle.

这篇关于在Docker Hub上共享多容器应用程序的最简单方法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-07 08:24