在 docker hub 上共享多容器应用程序的最简单方法是什么? [英] What is the simplest way to share a multi-container app on docker hub?

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

问题描述

我有一个完全 dockerised 的应用程序,其中包含多种服务:前端、后端、用户服务、多个数据库等...

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 上共享多容器应用程序的最简单方法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆