向泊坞窗图像添加新的入口点 [英] Add a new entrypoint to a docker image
问题描述
我尝试的第一件事是从基本图像创建一个DockerFile,然后添加命令来执行额外的步骤,如下所示:
从baseimage:标签
运行chmod a + w / path / to / entrypoint_creates_this_file
但是,它失败了,因为这些额外的步骤必须在运行基础容器entrypoint之后运行。
是有什么办法可以扩展基本图像的entrypoint吗?如果没有,那么正确的方法是什么?
谢谢
我最终在最新的entrypoint bash脚本中调用了原始的entrypoint bash脚本。
Recently, we decided to move one of our services to docker container. The service is product of another company and they have provided us the docker image. However, we need to do some extra configuration steps in the container entrypoint.
The first thing I tried, was to create a DockerFile from the base image and then add commands to do the extra steps, like this:
From baseimage:tag
RUN chmod a+w /path/to/entrypoint_creates_this_file
But, it failed, because these extra steps must be run after running the base container entrypoint.
Is there any way to extend entrypoint of a base image? if not, what is the correct way to do this?
Thanks
I finally ended up calling the original entrypoint bash script in my new entrypoint bash script, before doing other extra configuration steps.
这篇关于向泊坞窗图像添加新的入口点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!