forked from khicks/CryptoTools.net
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathContainerfile.ocp4
32 lines (26 loc) · 1.21 KB
/
Containerfile.ocp4
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
32
FROM ubi7/php-73
# cf. https://github.com/sclorg/s2i-php-container/blob/master/7.3/README.md#31-to-use-your-own-setup-create-a-dockerfile-with-this-content
# example: /cryptotools
# Empty CONTEXT_ROOT means /
ARG CONTEXT_ROOT=""
# Add application sources
ADD . ./${CONTEXT_ROOT}
# Install the dependencies
RUN TEMPFILE=$(mktemp) && \
curl -o "$TEMPFILE" "https://getcomposer.org/installer" && \
php <"$TEMPFILE" && \
cd ./${CONTEXT_ROOT} && \
${OLDPWD}/composer.phar install --no-interaction --no-ansi --optimize-autoloader
RUN cd ./${CONTEXT_ROOT} && \
cp config.sample.php config.php && \
sed "s|setBasePath(\"\");|setBasePath('${CONTEXT_ROOT}');|" -i index.php
# Run script uses standard ways to configure the PHP application
# and execs httpd -D FOREGROUND at the end
# See more in <version>/s2i/bin/run in this repository.
# Shortly what the run script does: The httpd daemon and php needs to be
# configured, so this script prepares the configuration based on the container
# parameters (e.g. available memory) and puts the configuration files into
# the approriate places.
# This can obviously be done differently, and in that case, the final CMD
# should be set to "CMD httpd -D FOREGROUND" instead.
CMD /usr/libexec/s2i/run