向泊坞窗图像添加新的入口点 [英] Add a new entrypoint to a docker image

查看:169
本文介绍了向泊坞窗图像添加新的入口点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近,我们决定把我们的服务转移到码头集装箱。该服务是另一家公司的产品,他们为我们提供了码头厂的形象。但是,我们需要在容器entrypoint中执行一些额外的配置步骤。



我尝试的第一件事是从基本图像创建一个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屋!

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