【发布时间】:2020-03-18 12:46:31
【问题描述】:
我有以下 dockerfile 并使用我创建了用于我的 openshift 部署的 docker 映像,但 pod 的日志显示错误
/bin/sh: can't create /etc/nginx/conf.d/default.conf: Permission denied
这是我的 Dockerfile
FROM abc/abc-ui-base:latest AS build
FROM nginx:stable-alpine
RUN set -ex && apk --update add ruby
COPY --from=build /root/build/nginx.docker.conf /etc/nginx/conf.d/fs.template
COPY --from=build /root/dist /public
RUN chmod go+w /var/cache/nginx
RUN chmod -R 777 /etc/nginx
CMD erb /etc/nginx/conf.d/fs.template > /etc/nginx/conf.d/default.conf; cat /etc/nginx/conf.d/default.conf; nginx -g 'daemon off;'
【问题讨论】: