Skip to content

Commit f8852f0

Browse files
authored
Dockerfile fixes (#35)
* add php7 package Otherwise there's no /usr/bin/php7 and nothing works * Improve development workflow in Dockerfile We should leverage docker caching so builds take less time.
1 parent b663147 commit f8852f0

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

Dockerfile

+7-2
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,9 @@ FROM alpine:edge
33
MAINTAINER Code Climate <hello@codeclimate.com>
44

55
WORKDIR /usr/src/app
6-
COPY . /usr/src/app
7-
86
# Install PHP
97
RUN apk --update add \
8+
php7 \
109
php7-common \
1110
php7-ctype \
1211
php7-dom \
@@ -22,13 +21,17 @@ RUN apk --update add \
2221
rm /var/cache/apk/* && \
2322
ln -s /usr/bin/php7 /usr/bin/php
2423

24+
COPY composer.* ./
25+
2526
RUN apk --update add curl && \
2627
curl -sS https://getcomposer.org/installer | php && \
2728
./composer.phar install && \
2829
apk del curl && \
2930
rm /usr/src/app/composer.phar \
3031
/var/cache/apk/*
3132

33+
COPY bin/build-content ./bin/build-content
34+
3235
# Build Content
3336
RUN apk --update add build-base ca-certificates ruby ruby-dev && \
3437
gem install json httparty --no-rdoc --no-ri && \
@@ -37,6 +40,8 @@ RUN apk --update add build-base ca-certificates ruby ruby-dev && \
3740
apk del build-base ca-certificates ruby ruby-dev && \
3841
rm /var/cache/apk/*
3942

43+
COPY . ./
44+
4045
RUN adduser -u 9000 -D app
4146
RUN chown -R app:app .
4247

0 commit comments

Comments
 (0)