Skip to content

Commit 5765d72

Browse files
committed
Add Fedora Dockerfile
1 parent 3853e5a commit 5765d72

File tree

1 file changed

+73
-0
lines changed

1 file changed

+73
-0
lines changed

7.1/Dockerfile.fedora

+73
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
FROM registry.fedoraproject.org/f26/s2i-base:latest
2+
3+
# This image provides an Apache+PHP environment for running PHP
4+
# applications.
5+
6+
EXPOSE 8080
7+
EXPOSE 8443
8+
9+
ENV PHP_VERSION=7.1 \
10+
PATH=$PATH:/usr/bin
11+
12+
ENV SUMMARY="Platform for building and running PHP $PHP_VERSION applications" \
13+
DESCRIPTION="PHP $PHP_VERSION available as docker container is a base platform for \
14+
building and running various PHP $PHP_VERSION applications and frameworks. \
15+
PHP is an HTML-embedded scripting language. PHP attempts to make it easy for developers \
16+
to write dynamically generated web pages. PHP also offers built-in database integration \
17+
for several commercial and non-commercial database management systems, so writing \
18+
a database-enabled webpage with PHP is fairly simple. The most common use of PHP coding \
19+
is probably as a replacement for CGI scripts."
20+
21+
ENV NAME=php \
22+
VERSION=0 \
23+
RELEASE=1 \
24+
ARCH=x86_64
25+
26+
LABEL summary="$SUMMARY" \
27+
description="$DESCRIPTION" \
28+
io.k8s.description="$DESCRIPTION" \
29+
io.k8s.display-name="Apache 2.4 with PHP 7.1" \
30+
io.openshift.expose-services="8080:http" \
31+
io.openshift.tags="builder,php,php71,rh-php71" \
32+
name="$FGC/$NAME" \
33+
com.redhat.component="$NAME" \
34+
version="$VERSION" \
35+
release="$RELEASE" \
36+
maintainer="SoftwareCollections.org <[email protected]>"
37+
38+
# Install Apache httpd and PHP
39+
RUN INSTALL_PKGS="php php-mysqlnd php-bcmath \
40+
php-gd php-intl php-ldap php-mbstring php-pdo \
41+
php-process php-soap php-opcache php-xml \
42+
php-gmp php-pecl-apcu mod_ssl" && \
43+
yum install -y --setopt=tsflags=nodocs $INSTALL_PKGS --nogpgcheck && \
44+
rpm -V $INSTALL_PKGS && \
45+
yum clean all -y
46+
47+
ENV PHP_CONTAINER_SCRIPTS_PATH=/usr/share/container-scripts/php/ \
48+
APP_ROOT=/opt/app-root \
49+
APP_DATA=/opt/app-root/src \
50+
PHP_DEFAULT_INCLUDE_PATH=/usr/share/pear \
51+
PHP_SYSCONF_PATH=/etc/ \
52+
PHP_HTTPD_CONF_FILE=php.conf \
53+
HTTPD_CONFIGURATION_PATH=/opt/app-root/etc/conf.d \
54+
HTTPD_MAIN_CONF_PATH=/etc/httpd/conf \
55+
HTTPD_MAIN_CONF_D_PATH=/etc/httpd/conf.d \
56+
HTTPD_VAR_RUN=/var/run/httpd \
57+
HTTPD_DATA_PATH=/var/www \
58+
HTTPD_DATA_ORIG_PATH=/var/www \
59+
HTTPD_VAR_PATH=/var
60+
61+
# Copy the S2I scripts from the specific language image to $STI_SCRIPTS_PATH
62+
COPY ./s2i/bin/ $STI_SCRIPTS_PATH
63+
64+
# Copy extra files to the image.
65+
COPY ./root/ /
66+
67+
# Reset permissions of filesystem to default values
68+
RUN /usr/libexec/container-setup && rpm-file-permissions
69+
70+
USER 1001
71+
72+
# Set the default CMD to print the usage of the language image
73+
CMD $STI_SCRIPTS_PATH/usage

0 commit comments

Comments
 (0)