File tree 3 files changed +375
-182
lines changed
3 files changed +375
-182
lines changed Original file line number Diff line number Diff line change 1
- FROM alpine:3.3
1
+ FROM alpine:edge
2
2
3
3
MAINTAINER Code Climate <
[email protected] >
4
4
5
5
WORKDIR /usr/src/app
6
- COPY composer.json /usr/src/app/
7
- COPY composer.lock /usr/src/app/
8
-
9
- RUN apk --update add git php-common php-xml php-dom php-ctype php-iconv \
10
- php-json php-pcntl php-phar php-openssl php-opcache php-sockets curl \
11
- build-base ruby-dev ruby ruby-bundler && \
12
- gem install httparty --no-rdoc --no-ri && \
13
- gem install json --no-rdoc --no-ri && \
14
- curl -sS https://getcomposer.org/installer | php && \
15
- /usr/src/app/composer.phar install && \
16
- apk del build-base
17
-
18
6
COPY . /usr/src/app
19
7
8
+ # Install PHP
9
+ RUN apk --update add \
10
+ php7-common \
11
+ php7-ctype \
12
+ php7-dom \
13
+ php7-iconv \
14
+ php7-json \
15
+ php7-mbstring \
16
+ php7-opcache \
17
+ php7-openssl \
18
+ php7-pcntl \
19
+ php7-phar \
20
+ php7-sockets \
21
+ php7-xml && \
22
+ rm /var/cache/apk/* && \
23
+ ln -s /usr/bin/php7 /usr/bin/php
24
+
25
+ RUN apk --update add curl && \
26
+ curl -sS https://getcomposer.org/installer | php && \
27
+ ./composer.phar install && \
28
+ apk del curl && \
29
+ rm /usr/src/app/composer.phar \
30
+ /var/cache/apk/*
31
+
32
+ # Build Content
33
+ RUN apk --update add build-base ca-certificates ruby ruby-dev && \
34
+ gem install json httparty --no-rdoc --no-ri && \
35
+ ./bin/build-content && \
36
+ rm -rf $( gem environment gemdir ) && \
37
+ apk del build-base ca-certificates ruby ruby-dev && \
38
+ rm /var/cache/apk/*
39
+
20
40
RUN adduser -u 9000 -D app
21
- RUN chown -R app .
41
+ RUN chown -R app:app .
22
42
23
43
USER app
24
44
25
- RUN ./bin/build-content
26
-
27
45
WORKDIR /code
28
46
VOLUME /code
29
47
Original file line number Diff line number Diff line change 1
1
{
2
2
"require" : {
3
- "phpmd/phpmd" : " 2.3.2 " ,
4
- "barracudanetworks/forkdaemon-php" : " 1.0.* "
3
+ "phpmd/phpmd" : " ~ 2.3" ,
4
+ "barracudanetworks/forkdaemon-php" : " ~ 1.0.7 "
5
5
},
6
6
"require-dev" : {
7
- "phpunit/phpunit" : " 5.3.* "
7
+ "phpunit/phpunit" : " ~ 5.3"
8
8
}
9
9
}
You can’t perform that action at this time.
0 commit comments