-
-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #82 from blar/alpine
Use alpine linux to reduce image size
- Loading branch information
Showing
1 changed file
with
5 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,12 @@ | ||
ARG VERSION=7.3 | ||
FROM php:${VERSION}-cli | ||
|
||
RUN set -xe \ | ||
&& apt-get update \ | ||
&& apt-get install -y git unzip \ | ||
&& rm -rf /var/lib/apt/lists/* \ | ||
# Install composer | ||
&& php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" \ | ||
&& php composer-setup.php --install-dir /usr/local/bin --filename composer \ | ||
&& php -r "unlink('composer-setup.php');" \ | ||
# Copy default php.ini | ||
&& cp /usr/local/etc/php/php.ini-development /usr/local/etc/php/php.ini \ | ||
&& composer global require overtrue/phplint | ||
FROM composer:1.10 AS build | ||
RUN composer global require overtrue/phplint | ||
|
||
FROM php:${VERSION}-cli-alpine | ||
COPY --from=build /tmp/vendor /root/.composer/vendor | ||
COPY entrypoint.sh /entrypoint.sh | ||
|
||
RUN chmod +x /entrypoint.sh | ||
RUN cp /usr/local/etc/php/php.ini-development /usr/local/etc/php/php.ini | ||
|
||
ENTRYPOINT ["/entrypoint.sh"] |