-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
157 lines (125 loc) · 4.82 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
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
153
154
155
156
157
FROM ubuntu:latest
RUN apt-get dist-upgrade \
&& apt-get update \
&& apt-get install -y locales && rm -rf /var/lib/apt/lists/* \
&& localedef -i ru_RU -c -f UTF-8 -A /usr/share/locale/locale.alias ru_RU.UTF-8
ENV LANG ru_RU.utf8
RUN apt-get update
RUN apt-get install -y sudo \
net-tools\
htop \
curl \
wget \
git
RUN echo "Europe/Moscow" > /etc/timezone
RUN mkdir /tmp/tmzns && cd /tmp/tmzns
RUN wget ftp://ftp.iana.org/tz/tzdata-latest.tar.gz
RUN tar zxvf tzdata-latest.tar.gz
RUN zic africa antarctica asia australasia europe northamerica southamerica
RUN ln -sf /usr/share/zoneinfo/Europe/Moscow /etc/localtime
RUN rm -rf /tmp/tmzns
RUN apt-get install -y mc \
nginx
RUN apt-get install -y mariadb-server-10.6 mariadb-client-10.6
RUN apt-get install -y software-properties-common && add-apt-repository ppa:ondrej/php
RUN apt-get update
RUN apt-get upgrade -y
RUN apt-get install -y php7.4 php7.4-fpm php7.4-cli \
php8.0 php8.0-fpm php8.0-cli \
php8.1 php8.1-fpm php8.1-cli \
php8.2 php8.2-fpm php8.2-cli
RUN apt-get update
RUN apt-get install -y --fix-missing php-xdebug-all-dev
RUN apt-get install -y --fix-missing php-pear
RUN apt-get install -y php-mbstring
RUN apt-get install -y php-bcmath
RUN apt-get install -y php-bz2
RUN apt-get install -y php-curl
RUN apt-get update
RUN apt-get install -y php7.4-curl
RUN apt-get install -y php8.0-curl
RUN apt-get install -y php8.1-curl
RUN apt-get install -y php8.2-curl
RUN apt-get install -y php-date
RUN apt-get install -y php-db
RUN apt-get install -y php-dev
RUN apt-get update
RUN apt-get install -y php-grpc
RUN apt-get install -y php-imagick
RUN apt-get install -y php-intl
RUN apt-get install -y php-ldap
RUN apt-get install -y php-mcrypt-all-dev
RUN apt-get install -y php-memcache
RUN apt-get update
RUN apt-get install -y php-memcached
RUN apt-get install -y php-mf2
RUN apt-get install -y php-zip
RUN apt-get install -y php-json
RUN apt-get install -y php-mongodb
RUN apt-get install -y php-odbc
RUN apt-get install -y php-pclzip
RUN apt-get update
RUN apt-get install -y php-pgsql
RUN apt-get install -y php7.4-pgsql
RUN apt-get install -y php8.0-pgsql
RUN apt-get install -y php8.1-pgsql
RUN apt-get install -y php8.2-pgsql
RUN apt-get install -y php-sodium
RUN apt-get install -y php-redis
RUN apt-get install -y php-soap
RUN apt-get install -y php-sqlite3
RUN apt-get install -y php-ssh2
RUN apt-get install -y php-mysql
RUN apt-get install -y php7.4-mysql
RUN apt-get install -y php8.0-mysql
RUN apt-get install -y php8.1-mysql
RUN apt-get install -y php8.2-mysql
RUN apt-get update
RUN apt-get install -y php-tcpdf
RUN apt-get install -y php-tidy
RUN apt-get install -y php-tokenizer
RUN apt-get install -y php-yaml
RUN apt-get install -y php-xml
RUN apt-get install -y php-uploadprogress
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
RUN curl -fsSL https://deb.nodesource.com/setup_current.x | bash - && \
apt-get install -y nodejs
RUN npm install --global yarn
RUN echo "short_open_tag = On\n\
max_execution_time = 60\n\
memory_limit = 256M\n\
display_errors = On\n\
display_startup_errors = On\n\
ignore_repeated_errors = On\n\
post_max_size = 32M\n\
upload_max_filesize = 32M\n\
xdebug.mode = debug\n\
xdebug.client_host = host.docker.internal\n\
" > /etc/php/custom-config.ini
RUN ln -sf /etc/php/custom-config.ini /etc/php/7.4/mods-available/custom-config.ini
RUN ln -sf /etc/php/7.4/mods-available/custom-config.ini /etc/php/7.4/fpm/conf.d/100-custom-config.ini
RUN ln -sf /etc/php/7.4/mods-available/custom-config.ini /etc/php/7.4/cli/conf.d/100-custom-config.ini
RUN ln -sf /etc/php/custom-config.ini /etc/php/8.0/mods-available/custom-config.ini
RUN ln -sf /etc/php/8.0/mods-available/custom-config.ini /etc/php/8.0/fpm/conf.d/100-custom-config.ini
RUN ln -sf /etc/php/8.0/mods-available/custom-config.ini /etc/php/8.0/cli/conf.d/100-custom-config.ini
RUN ln -sf /etc/php/custom-config.ini /etc/php/8.1/mods-available/custom-config.ini
RUN ln -sf /etc/php/8.1/mods-available/custom-config.ini /etc/php/8.1/fpm/conf.d/100-custom-config.ini
RUN ln -sf /etc/php/8.1/mods-available/custom-config.ini /etc/php/8.1/cli/conf.d/100-custom-config.ini
RUN ln -sf /etc/php/custom-config.ini /etc/php/8.2/mods-available/custom-config.ini
RUN ln -sf /etc/php/8.2/mods-available/custom-config.ini /etc/php/8.2/fpm/conf.d/100-custom-config.ini
RUN ln -sf /etc/php/8.2/mods-available/custom-config.ini /etc/php/8.2/cli/conf.d/100-custom-config.ini
RUN echo "root\n\
n\n\
y\n\
y\n\
y\n\
y" > /mysql_secure_installation_answers.txt
ENTRYPOINT service nginx start \
&& service mariadb start \
&& mysql_secure_installation < /mysql_secure_installation_answers.txt \
&& rm mysql_secure_installation_answers.txt \
&& touch /var/log/container.log \
&& tail -F /var/log/container.log
EXPOSE 80
EXPOSE 3306
EXPOSE 9003