xref: /php-ast/ci/Dockerfile (revision 25f390bb)
1ARG PHP_VERSION
2FROM php:$PHP_VERSION
3WORKDIR /php-ast
4ADD *.c *.h *.php config.m4 config.w32 package.xml LICENSE README.md ./
5
6# Assume compilation will be the time consuming step.
7# Add tests after compiling so that it's faster to update tests and re-run them locally.
8#
9# Use the same CFLAGS used to build the docker image but also check for warnings (this will emit warnings but not fail the build)
10RUN phpize && EXTRA_CFLAGS='-Wall -Wextra -Wno-unused-parameter' ./configure && make -j2 && make install
11RUN docker-php-ext-enable ast
12ADD tests ./tests
13ADD ci ./ci
14