-
-
Notifications
You must be signed in to change notification settings - Fork 85
/
Copy pathDockerfile-5.5
80 lines (62 loc) · 1.42 KB
/
Dockerfile-5.5
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-base.j2 instead.
FROM php:5.5-fpm
MAINTAINER "cytopia" <cytopia@everythingcli.org>
###
### Labels
###
LABEL \
name="cytopia's PHP-FPM 5.5 Image" \
image="devilbox/php-fpm" \
tag="5.5-base" \
vendor="devilbox" \
license="MIT"
###
### Envs
###
ENV MY_USER="devilbox" \
MY_GROUP="devilbox" \
MY_UID="1000" \
MY_GID="1000"
###
### User/Group
###
RUN set -x \
&& groupadd -g ${MY_GID} -r ${MY_GROUP} \
&& useradd -u ${MY_UID} -m -s /bin/bash -g ${MY_GROUP} ${MY_USER}
###
### Upgrade (install ps)
###
RUN set -x \
&& apt-get update \
&& apt-get upgrade -y \
&& apt-get install --no-install-recommends --no-install-suggests -y procps \
&& rm -rf /var/lib/apt/lists/*
###
### Configure
###
RUN set -x \
&& rm -rf /usr/local/etc/php-fpm.d \
&& mkdir -p /usr/local/etc/php-fpm.d
###
### Copy files
###
COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh
COPY ./data/docker-entrypoint.d /docker-entrypoint.d
COPY ./data/php-fpm.conf /usr/local/etc/php-fpm.conf
COPY ./data/php-fpm.d /usr/local/etc/php-fpm.d
###
### Verify
###
RUN set -x \
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^5.5' \
&& /usr/local/sbin/php-fpm --test \
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi
###
### Ports
###
EXPOSE 9000
###
### Entrypoint
###
ENTRYPOINT ["/docker-entrypoint.sh"]