|
| 1 | +# An approximately reproducible, but primarily isolated, environment for |
| 2 | +# running the acceptance tests: |
| 3 | +# |
| 4 | +# docker buildx build --file .github/pie-behaviour-tests/Dockerfile -t pie-behat-test . |
| 5 | +# docker run --volume .:/github/workspace -ti pie-behat-test |
| 6 | +FROM ubuntu:24.04 |
| 7 | + |
| 8 | +# Add the `unzip` package which PIE uses to extract .zip files |
| 9 | +RUN export DEBIAN_FRONTEND="noninteractive"; \ |
| 10 | + set -eux; \ |
| 11 | + apt-get update; \ |
| 12 | + apt-get install -y --no-install-recommends \ |
| 13 | + unzip curl jq wget g++ gcc make autoconf libtool bison re2c pkg-config \ |
| 14 | + ca-certificates libxml2-dev libssl-dev; \ |
| 15 | + update-ca-certificates ; \ |
| 16 | + rm -rf /var/lib/apt/lists/* |
| 17 | + |
| 18 | +# Compile PHP |
| 19 | +ARG PHP_VERSION=8.4 |
| 20 | +RUN mkdir -p /usr/local/src/php; \ |
| 21 | + cd /usr/local/src/php; \ |
| 22 | + FULL_LATEST_VERSION=`curl -fsSL "https://www.php.net/releases/index.php?json&max=1&version=$PHP_VERSION" | jq -r '.[].source[]|select(.filename|endswith(".gz")).filename'`; \ |
| 23 | + wget -O php.tgz "https://www.php.net/distributions/$FULL_LATEST_VERSION" ; \ |
| 24 | + tar zxf php.tgz ; \ |
| 25 | + rm php.tgz ; \ |
| 26 | + ls -l ; \ |
| 27 | + cd * ; \ |
| 28 | + ls -l ; \ |
| 29 | + ./buildconf --force ; \ |
| 30 | + ./configure --without-sqlite3 --disable-pdo --disable-dom --disable-xml --disable-xmlreader --disable-xmlwriter --disable-json --with-openssl ; \ |
| 31 | + make -j$(nproc) ; \ |
| 32 | + make install |
| 33 | + |
| 34 | +RUN touch /usr/local/lib/php.ini |
| 35 | + |
| 36 | +COPY --from=ghcr.io/php/pie:bin /pie /usr/bin/pie |
| 37 | +RUN pie install xdebug/xdebug |
| 38 | + |
| 39 | +WORKDIR /github/workspace |
| 40 | + |
| 41 | +ENV USING_PIE_BEHAT_DOCKERFILE=1 |
| 42 | +ENTRYPOINT ["php", "vendor/bin/behat"] |
| 43 | +CMD ["--no-snippets"] |
0 commit comments