generated from Monogramm/project-template
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile.develop
152 lines (141 loc) · 4.1 KB
/
Dockerfile.develop
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
FROM php:7.4-fpm
ARG COMPOSER_VERSION=2.0.11
# install the packages we need
# install the PHP extensions we need
# configure the PHP extensions
# give acces to apache on the site files
RUN set -ex; \
apt-get update -q; \
apt-get install -y --no-install-recommends \
cron \
netcat \
openssl \
rsync \
unzip \
wget \
zip \
; \
apt-get install -y --no-install-recommends \
g++ \
libcurl4-openssl-dev \
libfreetype6-dev \
libicu-dev \
libjpeg-dev \
libldap2-dev \
libonig-dev \
libpng-dev \
libpq-dev \
librabbitmq-dev \
libsodium-dev \
libxml2-dev \
libzip-dev \
make \
zlib1g-dev \
; \
curl -sL 'https://deb.nodesource.com/setup_12.x' -o nodesource_setup.sh ; \
bash nodesource_setup.sh; \
apt-get install -y \
nodejs \
; \
npm --version; \
apt-get update -q; \
apt-get install -y \
yarn \
; \
yarn --version; \
rm -rf /var/lib/apt/lists/*; \
debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \
docker-php-ext-configure ldap --with-libdir="lib/$debMultiarch"; \
docker-php-ext-configure gd; \
docker-php-ext-configure intl; \
docker-php-ext-configure zip; \
echo "\n" | pecl install apcu; \
docker-php-ext-enable apcu; \
echo "apc.enable_cli=1" >> /usr/local/etc/php/conf.d/docker-php-ext-apcu.ini; \
pecl install amqp; \
docker-php-ext-enable amqp; \
pecl install -o -f redis; \
docker-php-ext-enable redis; \
pecl install libsodium; \
docker-php-ext-enable sodium; \
yes | pecl install xdebug; \
echo "xdebug.mode=debug\n" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \
"xdebug.idekey=\"DOCKER\"\n" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \
"xdebug.client_port=9003\n" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini; \
docker-php-ext-enable xdebug; \
docker-php-ext-install -j "$(nproc)" \
bcmath \
gd \
intl \
ldap \
mbstring \
mysqli \
opcache \
pdo \
pdo_mysql \
pdo_pgsql \
pgsql \
soap \
sockets \
zip \
; \
\
curl --silent --show-error "https://getcomposer.org/installer" -o composer-setup.php; \
php composer-setup.php --install-dir=/usr/local/bin --filename=composer --version=${COMPOSER_VERSION}; \
composer --version; \
wget 'https://get.symfony.com/cli/installer' -O - | bash; \
mv /root/.symfony/bin/symfony /usr/local/bin/symfony; \
symfony -V
ENV DATABASE_DRIVER=sqlite \
DATABASE_VERSION= \
DATABASE_OPTIONS= \
DATABASE_HOST= \
DATABASE_PORT= \
DATABASE_NAME=app_db_dev \
DATABASE_USERNAME= \
DATABASE_PASSWORD= \
MAILER_TRANSPORT=smtp \
MAILER_HOST=127.0.0.1 \
MAILER_USER= \
MAILER_PASSWORD= \
SF_PROD='false' \
SF_ADMIN_LOGIN= \
SF_ADMIN_EMAIL= \
SF_ADMIN_PASSWD= \
SF_SERVER_PUBLIC_URL=http://localhost:80 \
SF_WEBSITE_PUBLIC_URL=http://localhost:80 \
SF_FACEBOOK_URL=# \
SF_TWITTER_URL=# \
SF_LINKEDIN_URL=# \
SF_YOUTUBE_URL=#
COPY ./cron/15min /etc/periodic/15min
COPY ./cron/hourly /etc/periodic/hourly
COPY ./cron/daily /etc/periodic/daily
COPY ./cron/weekly /etc/periodic/weekly
COPY ./cron/monthly /etc/periodic/monthly
VOLUME /var/www/html
ARG WWW_GROUP_ID=1000
ARG WWW_USER_ID=1000
COPY entrypoint.sh /
RUN set -ex; \
chmod 755 /entrypoint.sh; \
groupadd -f --gid ${WWW_GROUP_ID} symfony; \
adduser --disabled-password --gecos '' --uid ${WWW_USER_ID} --gid ${WWW_GROUP_ID} symfony; \
chown -R symfony:symfony /var/www
WORKDIR /var/www/html/
USER symfony
ENTRYPOINT ["/entrypoint.sh"]
ARG APP_PATH=./app
COPY ${APP_PATH} /var/www/html/
# Install of the project (can also be done at runtime if mounted as volume)
RUN set -ex; \
composer \
--prefer-dist \
--no-interaction \
--optimize-autoloader --apcu-autoloader \
install \
; \
\
npm install \
--non-interactive \
;