File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed
Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change 11# elecena.pl (c) 2015-2020
22
3+ # @see https://hub.docker.com/_/composer
4+ FROM composer:1.10.5 AS php-composer
5+
36# @see https://hub.docker.com/_/python/
47FROM python:3.8-alpine
58RUN pip install virtualenv && rm -rf /root/.cache
69
10+ # copy composer from the first stage
11+ COPY --from=php-composer /usr/bin/composer /usr/bin
12+
713# install dependencies
814RUN apk update && apk add \
915 php7 \
@@ -38,12 +44,12 @@ RUN apk update && apk add \
3844 php7-xmlwriter \
3945 php7-xml \
4046 php7-xsl \
41- && rm -rf /tmp /var/log/* /var/cache/*
47+ && rm -rf /tmp/* /var/log/* /var/cache/*
4248
4349ENV PHP_VERSION 7.3.16
4450
4551# add an info script
4652WORKDIR /opt
4753
48- RUN echo "echo -e '### Python'; python -V; virtualenv --version; echo -e '\n ### PHP'; php -v; php -m" > info.sh
54+ RUN echo "echo -e '### Python'; python -V; virtualenv --version; echo -e '\n ### PHP'; php -v; composer -V; php -m" > info.sh
4955RUN chmod 744 info.sh
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ docker pull elecena/python-php
1111
1212```
1313REPOSITORY TAG IMAGE ID CREATED SIZE
14- elecena/python-php 3.8-7.3-alpine c9cc8676df95 36 minutes ago 139MB
14+ elecena/python-php 3.8-7.3-alpine-composer c9cc8676df95 6 minutes ago 141MB
1515```
1616
1717## Installed software
@@ -28,6 +28,7 @@ PHP 7.3.16 (cli) (built: Mar 20 2020 11:26:40) ( NTS )
2828Copyright (c) 1997-2018 The PHP Group
2929Zend Engine v3.3.16, Copyright (c) 1998-2018 Zend Technologies
3030 with Zend OPcache v7.3.16, Copyright (c) 1999-2018, by Zend Technologies
31+ Composer version 1.10.5 2020-04-10 11:44:22
3132[PHP Modules]
3233calendar
3334Core
You can’t perform that action at this time.
0 commit comments