X Tutup
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 14 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
# elecena.pl (c) 2015-2021
# elecena.pl (c) 2015-2022

# https://hub.docker.com/_/php
ARG PHP_VERSION=8.1.0
ARG PHP_VERSION=8.1.2

# https://hub.docker.com/_/python/
ARG PYTHON_VERSION=3.10.1
ARG PYTHON_VERSION=3.10.2

# https://hub.docker.com/_/composer
FROM composer:2 AS php-composer
ARG COMPOSER_VERSION=2.2.6

FROM composer:$COMPOSER_VERSION AS php-composer
RUN /usr/bin/composer -v

#
Expand All @@ -20,6 +22,12 @@ RUN apk add \
libxml2-dev \
libxslt-dev

# fixes "sockets" compilation issues
# sendrecvmsg.c:128:19: error: invalid application of 'sizeof' to incomplete type 'struct cmsgcred'
#
# see https://github.com/docker-library/php/issues/1245#issuecomment-1019957169
ENV CFLAGS="$CFLAGS -D_GNU_SOURCE"

RUN docker-php-ext-install \
bz2 \
calendar \
Expand All @@ -41,6 +49,7 @@ RUN which php; php -v; php -m; php -i | grep ini
#
FROM python:$PYTHON_VERSION-alpine
ARG PHP_VERSION
ARG COMPOSER_VERSION

RUN pip install virtualenv && rm -rf /root/.cache
RUN python -V
Expand All @@ -64,6 +73,7 @@ RUN php -r '$res = iconv("utf-8", "utf-8//IGNORE", "fooą");'

RUN php -v; php -m; php -i | grep ini
ENV PHP_VERSION $PHP_VERSION
ENV COMPOSER_VERSION $COMPOSER_VERSION

# add an info script
WORKDIR /opt
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ elecena/python-php latest 4eb6703d62df 2 seconds ago 105MB
$ docker run -it elecena/python-php sh info.sh

### Python
Python 3.10.1
virtualenv 20.10.0 from /usr/local/lib/python3.10/site-packages/virtualenv/__init__.py
Python 3.10.2
virtualenv 20.13.1 from /usr/local/lib/python3.10/site-packages/virtualenv/__init__.py

### PHP
PHP 8.1.0 (cli) (built: Nov 30 2021 07:15:23) (NTS)
PHP 8.1.2 (cli) (built: Jan 21 2022 21:38:22) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.0, Copyright (c) Zend Technologies
with Zend OPcache v8.1.0, Copyright (c), by Zend Technologies
Composer version 2.1.14 2021-11-30 10:51:43
Zend Engine v4.1.2, Copyright (c) Zend Technologies
with Zend OPcache v8.1.2, Copyright (c), by Zend Technologies
Composer version 2.2.6 2022-02-04 17:00:38
[PHP Modules]
bz2
calendar
Expand Down
X Tutup