-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
99 lines (88 loc) · 4.1 KB
/
Dockerfile
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
# +---------------------------------------------------------------------------------+
# | This file is part of greathouse-wordpress |
# +---------------------------------------------------------------------------------+
# | Copyright (c) 2017 Greathouse Technology LLC (http://www.greathouse.technology) |
# +---------------------------------------------------------------------------------+
# | greathouse-wordpress is free software: you can redistribute it and/or modify |
# | it under the terms of the GNU General Public License as published by |
# | the Free Software Foundation, either version 3 of the License, or |
# | (at your option) any later version. |
# | |
# | greathouse-wordpress is distributed in the hope that it will be useful, |
# | but WITHOUT ANY WARRANTY; without even the implied warranty of |
# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
# | GNU General Public License for more details. |
# | |
# | You should have received a copy of the GNU General Public License |
# | along with greathouse-wordpress. If not, see <http://www.gnu.org/licenses/>. |
# +---------------------------------------------------------------------------------+
# | Author: Jesse Greathouse <[email protected]> |
# +---------------------------------------------------------------------------------+
FROM alpine:3.11
LABEL maintainer="Jesse Greathouse <[email protected]>"
ENV PATH /app/bin:/app/opt/php/bin:$PATH
# Get core utils
RUN apk add --no-cache \
bash curl openssh g++ gcc make nasm git file coreutils python perl autoconf pkgconf supervisor expect ca-certificates \
readline-dev libxslt-dev ncurses-dev curl-dev libc-dev dpkg-dev pcre-dev mariadb-dev mariadb-connector-c libressl-dev \
libxml2-dev icu-dev libzip-dev oniguruma-dev libsodium-dev glib-dev libsodium-dev imagemagick-dev
# Add preliminary file structure
RUN mkdir /app
RUN mkdir /app/bin
RUN mkdir /app/etc
RUN mkdir /app/etc/nginx
RUN mkdir /app/etc/php
RUN mkdir /app/etc/php-fpm.d
RUN mkdir /app/etc/ssl
RUN mkdir /app/etc/ssl/CA
RUN mkdir /app/etc/ssl/certs
RUN mkdir /app/etc/ssl/private
RUN mkdir /app/etc/supervisor
RUN mkdir /app/etc/supervisor/conf.d
RUN mkdir /app/opt
RUN mkdir /app/src
RUN mkdir /app/tmp
RUN mkdir /app/var
RUN mkdir /app/var/cache
RUN mkdir /app/var/cache/opcache
RUN mkdir /app/var/cache/wp-cli
RUN mkdir /app/var/keys
RUN mkdir /app/var/logs
RUN mkdir /app/var/pools
RUN mkdir /app/var/run
RUN mkdir /app/var/session
RUN mkdir /app/var/socket
RUN mkdir /app/var/upload
RUN mkdir /app/var/wp-cli
RUN mkdir /app/var/wp-cli/packages
RUN mkdir /app/web
RUN touch /app/error.log
ADD opt /app/opt
# Add Scripts
ADD bin/install.sh /app/bin/install.sh
ADD bin/install-pear.sh /app/bin/install-pear.sh
ADD bin/generate-diffie-hellman.pl /app/bin/generate-diffie-hellman.pl
ADD bin/bust-opcache.sh /app/bin/bust-opcache.sh
WORKDIR /app
# Run the install script
RUN bin/install.sh
# Remove all dependency tarballs
RUN rm -rf /app/opt/*tar.gz
# Project files
# etc
ADD etc/nginx/error_page.conf /app/etc/nginx/error_page.conf
ADD etc/nginx/fastcgi_params.conf /app/etc/nginx/fastcgi_params.conf
ADD etc/nginx/lua_env.conf /app/etc/nginx/lua_env.conf
ADD etc/nginx/lua_package_cpath.conf /app/etc/nginx/lua_package_cpath.conf
ADD etc/nginx/lua_package_path.conf /app/etc/nginx/lua_package_path.conf
ADD etc/nginx/mime_types.conf /app/etc/nginx/mime_types.conf
ADD etc/nginx/proxy.conf /app/etc/nginx/proxy.conf
ADD etc/php/browscap.ini /app/etc/php/browscap.ini
ADD etc/supervisor/conf.d/supervisord.docker.conf /app/etc/supervisor/conf.d/supervisord.conf
# src
ADD src/ /app/src
# web
ADD web/ /app/web
# Expose ports
EXPOSE 3000
CMD ["/usr/bin/supervisord", "-c", "/app/etc/supervisor/conf.d/supervisord.conf"]