forked from dzikimarian/jenkins-php-slave
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
54 lines (46 loc) · 1.84 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
FROM php:7.1.11-cli
RUN apt-get update && apt-get install -y \
git \
curl \
wget \
libfreetype6-dev \
libjpeg62-turbo-dev \
libmcrypt-dev \
libpng12-dev \
libicu-dev \
unzip \
openssh-server \
software-properties-common \
sqlite3 \
libsqlite3-dev \
bzip2 \
libxml2-dev \
php-soap \
&& docker-php-ext-install -j$(nproc) iconv mcrypt \
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
&& docker-php-ext-install -j$(nproc) gd \
&& docker-php-ext-install -j$(nproc) bcmath \
&& docker-php-ext-install -j$(nproc) exif \
&& docker-php-ext-configure intl \
&& docker-php-ext-install intl \
&& docker-php-ext-install zip \
&& docker-php-ext-install pdo pdo_mysql pdo_sqlite \
&& docker-php-ext-install soap \
&& pecl install xdebug-2.5.0 \
&& docker-php-ext-enable xdebug
COPY php.ini /usr/local/etc/php/
RUN echo deb http://http.debian.net/debian jessie-backports main >> /etc/apt/sources.list
RUN apt-get update && apt-get install -t jessie-backports -y openjdk-8-jre-headless ca-certificates-java && update-alternatives --config java
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash - \
&& apt-get install -y nodejs \
&& apt-get install -y build-essential \
&& npm install -g npm yarn gulp-cli browserify @angular/cli karma-phantomjs-launcher phantomjs@2.1.1 --unsafe-perm
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
RUN sed -i 's|session required pam_loginuid.so|session optional pam_loginuid.so|g' /etc/pam.d/sshd
RUN mkdir -p /var/run/sshd
RUN adduser --quiet jenkins
RUN chmod 777 /usr/local/lib/php/extensions/no-debug-non-zts-20160303
RUN chmod 777 /usr/local/lib/php/extensions/no-debug-non-zts-20160303/xdebug.so
RUN echo "jenkins:jenkins" | chpasswd
EXPOSE 22
CMD ["/usr/sbin/sshd", "-D"]