-
-
Notifications
You must be signed in to change notification settings - Fork 26
/
Dockerfile
32 lines (24 loc) · 1.27 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
FROM balenalib/raspberrypi3-debian:stretch
# Add Ondrej Sury's apt repo and requirements.
RUN sudo apt-get update \
&& sudo apt-get install apt-transport-https lsb-release ca-certificates wget git \
&& sudo wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg \
&& echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list \
&& rm -rf /var/lib/apt/lists/*
# Install Apache, PHP
RUN sudo apt-get update \
&& sudo apt-get install -y \
apache2 libapache2-mod-php libpcre3-dev unzip \
php7.2-common:armhf php7.2-dev:armhf php7.2-gd:armhf php7.2-curl:armhf php7.2-imap:armhf php7.2-json:armhf php7.2-opcache:armhf php7.2-xml:armhf php7.2-mbstring:armhf php7.2-mysql:armhf php7.2-zip:armhf php-apcu:armhf \
mariadb-client \
&& rm -rf /var/lib/apt/lists/*
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
RUN a2enmod rewrite
RUN rm -f /etc/apache2/sites-enabled/000-default.conf
COPY vhosts.conf /etc/apache2/sites-enabled/vhosts.conf
COPY docker-entrypoint.sh /usr/local/bin/
RUN ln -s usr/local/bin/docker-entrypoint.sh / # For backwards compatibility.
ENTRYPOINT ["docker-entrypoint.sh"]
WORKDIR "/var/www/html"
EXPOSE 80
CMD ["/usr/sbin/apache2ctl", "-D", "FOREGROUND"]