-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
152 lines (137 loc) · 4.12 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
FROM ubuntu:24.04
# Set our our meta data for this container.
LABEL name="Ubuntu PHP 8.3 with SQLSRV and MySQL Workbench For Translating"
LABEL author="Michael R. Bagnall <[email protected]>"
WORKDIR /root
ENV TERM=xterm
ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/mssql-tools/bin:/opt/mssql/bin
RUN apt-get update && apt-get -y upgrade && DEBIAN_FRONTEND=noninteractive apt-get install -y \
build-essential \
git \
gnupg \
libnss3 \
nano \
netcat-openbsd \
ntp \
software-properties-common \
sudo \
vim \
wget \
zip \
mariadb-client \
mariadb-server \
curl \
net-tools \
gettext \
rsync \
unzip \
zlib1g
RUN curl https://packages.microsoft.com/keys/microsoft.asc | sudo tee /etc/apt/trusted.gpg.d/microsoft.asc && \
curl -fsSL https://packages.microsoft.com/keys/microsoft.asc | sudo gpg --dearmor -o /usr/share/keyrings/microsoft-prod.gpg && \
curl -fsSL https://packages.microsoft.com/config/ubuntu/22.04/mssql-server-2022.list | tee /etc/apt/sources.list.d/mssql-server-2022.list && \
curl https://packages.microsoft.com/config/ubuntu/22.04/prod.list | tee /etc/apt/sources.list.d/mssql-release.list && \
apt update -y && \
ACCEPT_EULA=Y apt install -y mssql-server mssql-tools unixodbc-dev msodbcsql18 && \
wget https://dev.mysql.com/get/Downloads/MySQLGUITools/mysql-workbench-community_8.0.38-1ubuntu24.04_amd64.deb && \
apt-get install -y \
libatk1.0-0t64 \
libatkmm-1.6-1v5 \
libcairo2 \
libgdk-pixbuf-2.0-0 \
libglibmm-2.4-1t64 \
libglx0 \
libgtk-3-0t64 \
libgtk2.0-0t6 \
libgtkmm-3.0-1t6 \
libopengl0 \
libpango-1.0-0 \
libpangocairo-1.0-0 \
libproj25 \
libsecret-1-0 \
libsigc++-2.0-0v5 \
libzip4t64 && \
DEBIAN_FRONTEND=noninteractive dpkg -i mysql-workbench-community_8.0.38-1ubuntu24.04_amd64.deb
# Add ondrej/php PPA repository for PHP.
RUN add-apt-repository ppa:ondrej/php && \
apt-get update -y && \
apt-get upgrade -y && \
apt-get install dialog && \
apt -y install apache2 && \
apt -y install apache2-utils
RUN apt-get install -y \
php8.3 \
php8.3-common \
php8.3-bcmath \
php8.3-bz2 \
php8.3-ctype \
php8.3-curl \
php8.3-dba \
php8.3-dom \
php8.3-exif \
php8.3-ffi \
php8.3-fileinfo \
php8.3-ftp \
php8.3-gd \
php8.3-gettext \
php8.3-iconv \
php8.3-igbinary \
php8.3-mbstring \
php8.3-memcached \
php8.3-mysqli \
php8.3-mysqlnd \
php8.3-mysql \
php8.3-phar \
php8.3-posix \
php8.3-shmop \
php8.3-simplexml \
php8.3-soap \
php8.3-sockets \
php8.3-sysvsem \
php8.3-sysvmsg \
php8.3-sysvshm \
php8.3-tokenizer \
php8.3-xml \
php8.3-dev \
php8.3-xmlreader \
php8.3-xmlwriter \
php8.3-xsl \
php8.3-zip \
php8.3-opcache \
php-pear \
libapache2-mod-php8.3 && \
pecl install sqlsrv && \
pecl install pdo_sqlsrv
COPY etc/apache2/apache2-auth.conf /etc/apache2/apache2-auth.conf
COPY etc/apache2/apache2-noauth.conf /etc/apache2/apache2-noauth.conf
RUN rm /etc/apache2/sites-enabled/000-default.conf
COPY etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/000-default.conf
RUN ln -s /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-enabled/000-default.conf
COPY etc/php/8.3/apache2/php.ini /etc/php/8.3/apache2/php.ini
COPY etc/php/8.3/cli/php.ini /etc/php/8.3/cli/php.ini
# Enable MSSQL PHP modules
RUN printf "; priority=20\nextension=sqlsrv.so\n" > /etc/php/8.3/mods-available/sqlsrv.ini
RUN printf "; priority=30\nextension=pdo_sqlsrv.so\n" > /etc/php/8.3/mods-available/pdo_sqlsrv.ini
RUN phpenmod sqlsrv pdo_sqlsrv
# Configure Apache. Be sure to enable apache mods or you're going to have a bad time.
RUN a2enmod rewrite \
&& a2enmod actions \
&& a2enmod alias \
&& a2enmod deflate \
&& a2enmod dir \
&& a2enmod expires \
&& a2enmod headers \
&& a2enmod mime \
&& a2enmod negotiation \
&& a2enmod setenvif \
&& a2enmod proxy \
&& a2enmod proxy_http \
&& a2enmod speling \
&& a2enmod cgid \
&& a2enmod remoteip \
&& a2enmod ssl \
&& a2enmod php8.3
USER root
WORKDIR /root
ADD etc/run-httpd.sh /run-httpd.sh
RUN chmod -v +x /run-httpd.sh
CMD [ "/run-httpd.sh" ]