-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
27 lines (20 loc) · 924 Bytes
/
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
## Set our base image ##
FROM sgtcoder/apache-base
ENV PUID=1000
ENV PGID=1000
ENV DOCUMENT_ROOT="/var/www/html"
## WordPress CLI ##
RUN curl https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -o /usr/local/bin/wp && chmod +x /usr/local/bin/wp
## Copy Default Config ##
COPY ./configs/000-default.conf /etc/apache2/sites-available/000-default.conf
COPY ./configs/healthcheck.conf /etc/apache2/conf-enabled/healthcheck.conf
COPY ./configs/php.ini /usr/local/etc/php/php.ini
## User Permissions ##
RUN mkdir /home/www-data && chown -R www-data:www-data /home/www-data
RUN usermod -u $PUID -d /home/www-data -s /bin/bash www-data && groupmod -g $PGID www-data
## Healthcheck ##
HEALTHCHECK CMD curl --fail http://localhost:5000/healthcheck || exit 1
## Cleanup ##
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*
## Working Directory ##
WORKDIR ${DOCUMENT_ROOT}