当我构建Docker时,shell脚本中的命令,' service gearman-job-server start'不起作用。因此,我必须手动连接其容器并执行“服务gearman-job-server start&#39 ;.
我使用的Docker文件如下。为什么这不起作用?我每次建造时都需要手动启动齿轮装置吗?
任何建议和意见将不胜感激。提前谢谢。
# Gearman
RUN apt-get -y install php-gearman
RUN apt-get -qq -y install gearman-job-server
COPY entrypoint.sh /usr/local/bin/
RUN ln -s usr/local/bin/entrypoint.sh /entrypoint.sh
RUN usr/local/bin/entrypoint.sh