forked from fr0tt/benotes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
84 lines (62 loc) · 1.43 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
FROM webdevops/php-nginx:8.1-alpine
LABEL mantainer="github.com/fr0tt"
LABEL description="Benotes"
ENV user application
ENV TZ=UTC
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN apk --no-cache update && apk --no-cache add \
git \
curl \
curl-dev \
zlib-dev \
libpng-dev \
libjpeg-turbo \
libjpeg-turbo-dev \
libxml2-dev \
libmcrypt-dev \
libpq \
postgresql-dev \
sqlite \
zip \
unzip \
libzip-dev \
libmcrypt-dev \
openssl
RUN docker-php-ext-configure gd \
--enable-gd \
--with-jpeg
RUN docker-php-ext-install \
pdo \
pdo_mysql \
mysqli \
pgsql \
pdo_pgsql \
opcache \
exif \
pcntl \
bcmath \
gd \
curl \
dom \
xml
COPY ./docker/nginx/default.conf /opt/docker/etc/nginx/main.conf
COPY ./docker/entrypoint.sh /entrypoint.d/app_entrypoint.sh
# will be overriden by the bind mount - if used
COPY . /var/www/
RUN chown -R $user:$user /var/www
WORKDIR /var/www
RUN chown -R $user:www-data storage && chmod -R 775 storage
USER $user
ARG USE_COMPOSER
RUN if [ "$USE_COMPOSER" = "true" ] ; \
then \
composer install --prefer-dist --no-interaction ; \
fi
USER root
ARG INSTALL_NODE
RUN if [ "$INSTALL_NODE" = "true" ] ; \
then \
apk --no-cache add nodejs npm ; \
fi
# will be overriden by the bind mount - if used
RUN ln -snf ../storage/app/public/ public/storage