-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
50 lines (41 loc) · 1.24 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
FROM hosteeka/whmcs-base:8.8-apache-php8.1
# SYSTEM SETUP
# Set environment variables
#
# SERVER_ROOT is the root directory of the server
#
ENV SERVER_ROOT /var/www/html
WORKDIR $SERVER_ROOT
# Install dependencies
#
# libxml2-dev is required by soap extension
# libzip-dev is required by zip extension
#
RUN set -eux; \
apt-get update; \
apt-get install -y --no-install-recommends \
libxml2-dev \
libzip-dev; \
rm -rf /var/lib/apt/lists/*
# Install PHP extensions
#
# soap and zip are recommended by whmcs
#
RUN docker-php-ext-install soap zip
# WHMCS SETUP
# Install ioncube loader
RUN set -eux; \
curl -fsSL 'https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64_13.0.2.tar.gz' -o ioncube.tar.gz; \
mkdir -p /tmp/ioncube; \
tar -xf ioncube.tar.gz -C /tmp/ioncube --strip-components=1; \
rm ioncube.tar.gz; \
mv /tmp/ioncube/ioncube_loader_lin_8.1.so $(php -r "echo ini_get('extension_dir');")/ioncube_loader.so; \
rm -r /tmp/ioncube; \
docker-php-ext-enable ioncube_loader
# Copy WHMCS files
COPY --chown=www-data:www-data ./whmcs .
COPY --chown=www-data:www-data ./includes ./includes
COPY --chown=www-data:www-data ./modules ./modules
COPY --chown=www-data:www-data ./templates ./templates
# Expose ports
EXPOSE 80