如何将多张图片合二为一? [英] How do I combine several images into one?
本文介绍了如何将多张图片合二为一?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有几个图像(第 3 方),例如设置 mysql、设置通用 php 应用程序环境、设置第 3 方工具.
I have several images (3rd parties) which eg setup a mysql, set up a generic php app environment, set up 3rd parties tools.
我想制作一个 Dockerfile/Docker Image 结合这两个图像,然后运行更多命令
I want to make a Dockerfile / Docker Image which combines both those images and then runs some more commands
imageA --
imageV -- ---> sharedImageA..X
/
imageX --
推荐答案
你可以链接它们.你可以在这里找到更多
You can chain them. You can find more here
https://github.com/docker/docker/issues/3378#issuecomment-31314906
取自以上链接
## Dockerfile.genericwebapp might have FROM ubuntu
cat Dockerfile.genericwebapp | docker build -t genericwebapp -
## Dockerfile.genericpython-web would have FROM genericwebapp
cat Dockerfile.genericpython-web | docker build -t genericpython-web -
## and then this specific app i'm testing might have a docker file that containers FROM genericpython-web
docker build -t thisapp .
以上作者 SvenDowideit
一般来说,在同一个容器上运行多个进程是一种不好的做法.
In general though, it's a bad practice to have more than one running processes on the same container.
这篇关于如何将多张图片合二为一?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文