将文件复制到LCOW中的docker映像

时间:2018-06-28 13:05:40

标签: docker dockerfile

我想为docker尝试一些LCOW东西,所以我尝试基于redis:4.0.8-alpine构建映像。我有一个自定义的sentinel.conf文件,需要复制到该图像。当Docker进入复制步骤时,出现此错误:

invalid COPY: Current WorkingDir / is not platform consistent

这是我的dockerfile

# Set the base image
FROM redis:4.0.8-alpine
WORKDIR /

# Copy over the configuration file
COPY sentinel.conf /usr/local/etc/redis/sentinel.conf
COPY redis.conf /usr/local/etc/redis/redis.conf

# Copy over the entrypoint that sets the environment variables
COPY redis-entrypoint.sh /usr/local/bin/

# Set the entrypoint to the new entrypoint script
# this script calls the original entrypoint when configuration file is ready
ENTRYPOINT ["redis-entrypoint.sh"]

# Define the entry point for the image
CMD [ "redis-server", "/usr/local/etc/redis/redis.conf" ]

有什么想法可以使我的工作目录平台保持一致吗?

0 个答案:

没有答案