-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
94 lines (77 loc) · 2.62 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
#
#--------------------------------------------------------------------------
# Image Setup
#--------------------------------------------------------------------------
#
FROM php:5.6-fpm
MAINTAINER Clément Blanco <clement@cyber-duck.co.uk>
#
#--------------------------------------------------------------------------
# Software's Installation
#--------------------------------------------------------------------------
#
# Installing tools and PHP extentions using "apt", "docker-php", "pecl",
#
# Install "curl", "libmemcached-dev", "libpq-dev", "libjpeg-dev",
# "libpng12-dev", "libfreetype6-dev", "libssl-dev", "libmcrypt-dev",
RUN apt-get update && \
apt-get install -y --force-yes --no-install-recommends \
curl \
libmemcached-dev \
libz-dev \
libpq-dev \
libjpeg-dev \
libpng12-dev \
libfreetype6-dev \
libssl-dev \
libmcrypt-dev \
openssh-server \
swig \
cmake \
wget \
git \
cron \
nano
# Install the PHP mcrypt extention
RUN docker-php-ext-install mcrypt
# Install the PHP pdo_mysql extention
RUN docker-php-ext-install pdo_mysql
# Install the PHP pdo_pgsql extention
RUN docker-php-ext-install pdo_pgsql
#####################################
# GD:
#####################################
# Install the PHP gd library
RUN docker-php-ext-install gd && \
docker-php-ext-configure gd \
--enable-gd-native-ttf \
--with-jpeg-dir=/usr/lib \
--with-freetype-dir=/usr/include/freetype2 && \
docker-php-ext-install gd
#####################################
# PDFNetPHP by PDF Tron:
#####################################
# Create a temporary folder for this
RUN mkdir ~/PDFNetPHPSetup && \
# Download the wrappers repo and extract it
cd ~/PDFNetPHPSetup && wget https://github.com/PDFTron/PDFNetWrappers/archive/master.tar.gz && \
tar xzvf master.tar.gz && \
# Move to the correct folder before compiling
cd PDFNetWrappers-master/PDFNetC && \
# Download the PDFNet library and extract it here
wget http://www.pdftron.com/downloads/PDFNetC64.tar.gz && tar xzvf PDFNetC64.tar.gz && \
# Prepare for compilation
mv PDFNetC64/Headers/ . && mv PDFNetC64/Lib/ . && \
cd .. && mkdir Build && cd Build && \
# Compiling...
cmake -D BUILD_PDFNetPHP=ON .. && make && make install && \
# Installing the PHP extension
docker-php-ext-enable PDFNetPHP
#####################################
# Final Touch:
#####################################
RUN rm -r /var/lib/apt/lists/*
RUN usermod -u 1000 www-data
WORKDIR /var/www
EXPOSE 9000
CMD ["php-fpm"]