-
Notifications
You must be signed in to change notification settings - Fork 53
/
Copy pathDockerfile
63 lines (51 loc) · 1.47 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
FROM php:7.4.14-fpm-alpine
LABEL Maintainer Michael Shihjay Chen <[email protected]>
ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/
RUN apk add --update --no-cache \
bash \
supervisor \
nano \
mariadb-client \
postgresql-client && \
chmod +x /usr/local/bin/install-php-extensions && sync && \
install-php-extensions \
opcache \
mysqli \
pgsql \
pdo_mysql \
pdo_pgsql \
sockets \
intl \
gd \
zip \
bz2 \
pcntl \
soap \
imap \
exif \
gmp \
bcmath \
imagick \
@composer
WORKDIR "/var/www/nosh"
# Copy existing application directory permissions
COPY --chown=www-data:www-data . /var/www/nosh
RUN mkdir /var/www/nosh/vendor &&\
chmod 777 /var/www/nosh/storage &&\
chmod 777 /var/www/nosh/public &&\
chmod 777 /var/www/nosh/vendor &&\
mkdir /noshdocuments &&\
chown -R www-data:www-data /noshdocuments &&\
chmod -R 755 /noshdocuments
USER www-data
# Install all PHP dependencies
RUN composer install --no-interaction
USER root
COPY docker-entrypoint.sh /usr/local/bin/
RUN ["chmod", "+x", "/usr/local/bin/docker-entrypoint.sh"]
COPY supervisord.conf /etc/supervisord.conf
COPY schedule.sh /usr/local/bin/schedule.sh
RUN ["chmod", "+x", "/usr/local/bin/schedule.sh"]
ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
EXPOSE 9000
CMD ["/usr/bin/supervisord", "-n", "-c", "/etc/supervisord.conf"]