티스토리 뷰


FROM openshift/base-rhel7


# This image provides an Apache+PHP environment for running PHP

# applications.


EXPOSE 8080


ENV PHP_VERSION=5.6 \

    PATH=$PATH:/opt/rh/rh-php56/root/usr/bin


LABEL io.k8s.description="Platform for building and running PHP 5.6 applications" \

      io.k8s.display-name="Apache 2.4 with PHP 5.6" \

      io.openshift.expose-services="8080:http" \

      io.openshift.tags="builder,php,php56,rh-php56"


# Labels consumed by Red Hat build service

LABEL Name="rhscl/php-56-rhel7" \

      BZComponent="rh-php56-docker" \

      Version="5.6" \

      Release="3" \

      Architecture="x86_64"


# Install Apache httpd and PHP

RUN yum-config-manager --enable rhel-server-rhscl-7-rpms && \

    yum-config-manager --enable rhel-7-server-optional-rpms && \

    yum install -y --setopt=tsflags=nodocs httpd24 \

    rh-php56 rh-php56-php rh-php56-php-mysqlnd rh-php56-php-pgsql rh-php56-php-bcmath \

    rh-php56-php-gd rh-php56-php-intl rh-php56-php-ldap rh-php56-php-mbstring rh-php56-php-pdo \

    rh-php56-php-pecl-memcache rh-php56-php-process rh-php56-php-soap rh-php56-php-opcache rh-php56-php-xml \

    rh-php56-php-pecl-xdebug && \

    yum clean all -y


# Copy the S2I scripts from the specific language image to $STI_SCRIPTS_PATH

COPY ./s2i/bin/ $STI_SCRIPTS_PATH


# Each language image can have 'contrib' a directory with extra files needed to

# run and build the applications.

COPY ./contrib/ /opt/app-root


# In order to drop the root user, we have to make some directories world

# writeable as OpenShift default security model is to run the container under

# random UID.

RUN sed -i -f /opt/app-root/etc/httpdconf.sed /opt/rh/httpd24/root/etc/httpd/conf/httpd.conf && \

    sed -i '/php_value session.save_path/d' /opt/rh/httpd24/root/etc/httpd/conf.d/rh-php56-php.conf && \

    head -n151 /opt/rh/httpd24/root/etc/httpd/conf/httpd.conf | tail -n1 | grep "AllowOverride All" || exit && \

    mkdir /tmp/sessions && \

    chmod -R a+rwx /etc/opt/rh/rh-php56 && \

    chmod -R a+rwx /opt/rh/httpd24/root/var/run/httpd && \

    chmod -R a+rwx /tmp/sessions && \

    chown -R 1001:0 /opt/app-root /tmp/sessions


USER 1001


# Set the default CMD to print the usage of the language image

CMD $STI_SCRIPTS_PATH/usage

공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/05   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
글 보관함