我正在使用自定义的Source-to-image项目来构建drupal图像,以便在OpenShift上运行。
从cli开始本地运行时,s2i项目运行良好。
我尝试使用https://docs.openshift.com/container-platform/3.4/dev_guide/managing_images.html#writing-image-streams-for-s2i-builders中的说明在OpenShift中进行设置。
S2i项目
Drupal s2i项目位于https://github.com/hughestech/s2i-shepherd-drupal
的ImageStream
我的yam文件如下:
apiVersion: v1
kind: ImageStream
metadata:
name: drupal
annotations:
openshift.io/display-name: Drupal
spec:
tags:
- name: '2.0'
annotations:
openshift.io/display-name: Drupal Builder
description: >-
Build and run Drupal applications on CentOS 7.
iconClass: icon-php
sampleRepo: 'https://github.com/hughestech/open_social.git'
tags: 'builder,php, drupal'
version: '1.0'
from:
kind: DockerImage
name: '172.30.1.121:5000/test/s2i-shepherd-drupal:latest'
然而,当我运行它时(通过OpenShift Web控制台>目录> PHP,我收到以下错误:
cp: cannot create regular file '././phpunit.xml.dist': Permission denied
cp: cannot create regular file '././social.info.yml': Permission denied
cp: cannot create regular file '././social.install': Permission denied
cp: cannot create regular file '././social.profile': Permission denied
cp: cannot create regular file '././.gitignore': Permission denied
cp: cannot create regular file '././.travis.yml': Permission denied
cp: cannot create regular file '././README.md': Permission denied
cp: cannot create regular file '././build-social.make': Permission denied
cp: cannot create regular file '././composer.json': Permission denied
cp: cannot create regular file '././drupal-org-core.make': Permission denied
cp: cannot create regular file '././drupal-org.make': Permission denied
cp: cannot create directory '././.git': Permission denied
cp: cannot create directory '././config': Permission denied
cp: cannot create directory '././libraries': Permission denied
cp: cannot create directory '././modules': Permission denied
cp: cannot create directory '././themes': Permission denied
cp: cannot create directory '././src': Permission denied
cp: cannot create directory '././tests': Permission denied
显然我需要授予权限 - 但是如何以及在哪里?这是我在OpenShift中需要做的事情吗?是否将索引源的目录存在于s2i项目中,还是在s2i进程在OpenShift中运行时创建?
构建广告连播错误
/apache2-foreground: 11: [: /var/www/html: unexpected operator
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 10.128.1.64. Set the 'ServerName' directive globally to suppress this message
[Tue Sep 12 13:07:05.474838 2017] [core:emerg] [pid 1] (13)Permission denied: AH00023: Couldn't create the rewrite-map mutex (file /var/lock/apache2/rewrite-map.1)
AH00016: Configuration Failed