Skip to content

Commit

Permalink
Use multi-stage build, bump PHP, add etc/ directory
Browse files Browse the repository at this point in the history
  • Loading branch information
mrook committed Nov 7, 2018
1 parent 37d5328 commit 7494ed3
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 11 deletions.
10 changes: 10 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.dockerignore
.gitignore
.git
.github
.idea
ansible
build
docs
test
vendor
22 changes: 11 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
FROM php:7.1-cli
MAINTAINER Phing <info@phing.info>
FROM composer:1.7 AS composer

RUN apt-get update -qq -y && \
apt-get install -y --no-install-recommends git unzip && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
ADD composer.* ./
ADD classes/ classes
RUN mkdir -p test/classes

RUN curl -o composer.phar https://getcomposer.org/composer.phar
RUN composer global require hirak/prestissimo --no-plugins --no-scripts
RUN composer install --optimize-autoloader --prefer-dist --no-progress --no-interaction

FROM php:7.2-cli-alpine AS phing
MAINTAINER Phing <info@phing.info>

ADD bin/phing* bin/
ADD classes/ classes
ADD composer.* ./

RUN mkdir -p test/classes
ADD etc/ etc

RUN php composer.phar install -o && rm -rf ~/.composer
COPY --from=composer /app/vendor/ ./vendor

ENTRYPOINT ["phing"]

0 comments on commit 7494ed3

Please sign in to comment.