forked from shopwareDowntown/downtown
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
47 lines (36 loc) · 1.36 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
FROM alpine:3.10
ENV COMPOSER_HOME=/var/cache/composer
ENV PROJECT_ROOT=/sw6
ENV ARTIFACTS_DIR=/artifacts
ENV LD_PRELOAD=/usr/lib/preloadable_libiconv.so
RUN apk --no-cache add \
nginx supervisor curl zip rsync \
php7 php7-fpm \
php7-ctype php7-curl php7-dom php7-fileinfo php7-gd \
php7-iconv php7-intl php7-json php7-mbstring \
php7-mysqli php7-openssl php7-pdo_mysql \
php7-session php7-simplexml php7-tokenizer php7-xml php7-xmlreader php7-xmlwriter \
php7-zip php7-zlib php7-phar git \
gnu-libiconv \
&& adduser -u 1000 -D -h $PROJECT_ROOT sw6 sw6 \
&& rm /etc/nginx/conf.d/default.conf
# Copy system configs
COPY config/etc /etc
# Make sure files/folders needed by the processes are accessable when they run under the sw6
RUN chown -R sw6.sw6 /run && \
chown -R sw6.sw6 /var/lib/nginx && \
chown -R sw6.sw6 /var/tmp/nginx && \
chown -R sw6.sw6 /var/log/nginx
WORKDIR $PROJECT_ROOT
USER sw6
ADD --chown=sw6 . .
RUN bin/console assets:install \
&& rm -Rf var/cache \
&& touch install.lock \
&& mkdir -p var/cache
# Expose the port nginx is reachable on
EXPOSE 8000
# Let supervisord start nginx & php-fpm
ENTRYPOINT ["./bin/entrypoint.sh"]
# Configure a healthcheck to validate that everything is up&running
HEALTHCHECK --timeout=10s CMD curl --silent --fail http://127.0.0.1:8000/fpm-ping