-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathDockerfile
More file actions
108 lines (95 loc) · 3.05 KB
/
Dockerfile
File metadata and controls
108 lines (95 loc) · 3.05 KB
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
FROM ubuntu:20.04 AS acbrlibphpdev
ENV DEBIAN_FRONTEND="noninteractive"
RUN apt-get update
RUN yes "2" | apt install -y \
git \
php-dev \
libxml2 \
openssl \
libxmlsec1-openssl \
libxslt-dev \
libgtk2.0-0 \
libcanberra-gtk-module \
apache2 \
php \
libapache2-mod-php \
xvfb
RUN apt install -y \
wget
#RUN apt-get install -y \
# mariadb-client \
# zip \
# curl \
# sudo \
# unzip \
# zlib1g-dev \
# libxpm-dev \
# libxml2-dev \
# libzip-dev \
# libicu-dev \
# libbz2-dev \
# libpng-dev \
# libjpeg-dev \
# libwebp-dev \
# libonig-dev \
# libmcrypt-dev \
# libreadline-dev \
# libfreetype6-dev \
# libcurl4-gnutls-dev \
# g++ \
# nano
## 2. apache configs + document root
#ENV APACHE_DOCUMENT_ROOT=/var/www/html/public
#RUN sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf
#RUN sed -ri -e 's!/var/www/!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf
## 3. mod_rewrite for URL rewrite and mod_headers for .htaccess extra headers like Access-Control-Allow-Origin-
#RUN a2enmod rewrite headers
## 4. start with base php config, then add extensions
#RUN mv "$PHP_INI_DIR/php.ini-development" "$PHP_INI_DIR/php.ini"
#RUN docker-php-ext-configure gd --enable-gd --with-freetype --with-jpeg --with-webp
#RUN docker-php-ext-install \
# gd \
# bz2 \
# intl \
# iconv \
# bcmath \
# opcache \
# calendar \
# mbstring \
# curl \
# soap \
# xml \
# mysqli \
# pdo \
# pdo_mysql \
# zip
# 5. composer
#COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
WORKDIR /home
RUN git clone https://github.com/CopernicaMarketingSoftware/PHP-CPP.git
WORKDIR /home/PHP-CPP
RUN make
RUN make install
WORKDIR /home
RUN wget -O libacbrnfe64.so https://www.dropbox.com/s/51jrad0bm9rp627/libacbrnfe64.so?dl=1
RUN mv libacbrnfe64.so /usr/lib/x86_64-linux-gnu
RUN ln -s /usr/lib/x86_64-linux-gnu/libxmlsec1.so.1 /usr/lib/x86_64-linux-gnu/libxmlsec1.so
RUN ln -s /usr/lib/x86_64-linux-gnu/libxmlsec1-openssl.so.1 /usr/lib/x86_64-linux-gnu/libxmlsec1-openssl.so
#RUN ln -s /usr/lib/x86_64-linux-gnu/libxslt.so.1 /usr/lib/x86_64-linux-gnu/libxslt.so
RUN ln -s /usr/lib/x86_64-linux-gnu/libxml2.so.2 /usr/lib/x86_64-linux-gnu/libxml.so
#RUN ln -s /usr/lib/x86_64-linux-gnu/libexslt.so.0 /usr/lib/x86_64-linux-gnu/libexslt.so
#RUN ln -s /usr/lib/x86_64-linux-gnu/libssl.so.1.0.0 /usr/lib/x86_64-linux-gnu/libssl.so
#RUN ln -s /usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0 /usr/lib/x86_64-linux-gnu/libcrypto.so
RUN git clone https://github.com/billbarsch/acbrlibphp.git | echo "19"
WORKDIR /home/acbrlibphp
RUN make
RUN make installdocker
RUN rm /var/www/html/index.html
RUN cp /home/acbrlibphp/exemplo/teste.php /var/www/html/index.php
RUN chown -R www-data:www-data /var/www/html
EXPOSE 80
#CMD Xvfb :99 &; service apache2 start; sleep infinity
#CMD [ "sleep", "infinity" ]
#ENTRYPOINT ["/home/acbrlibphp/start.sh"]
RUN chmod 0755 /home/acbrlibphp/start.sh
CMD ["bash", "/home/acbrlibphp/start.sh"]