← Back
Editing: Dockerfile.valgrind
ARG PHP_IMAGE ARG PHP_VERSION FROM $PHP_IMAGE:$PHP_VERSION WORKDIR /code ADD ci/adjust-debian-apt-sources.sh ci/ RUN ci/adjust-debian-apt-sources.sh RUN set -eux; . /etc/os-release; apt-get update && apt-get install -y $( [ "x${ID:-linux}" = "xdebian" ] && [ "x${VERSION_ID:-0}" = "x9" ] && echo "--allow-unauthenticated" ) valgrind && apt-get clean RUN set -eux; . /etc/os-release; apt-get install -y $( [ "x${ID:-linux}" = "xdebian" ] && [ "x${VERSION_ID:-0}" = "x9" ] && echo "--allow-unauthenticated" ) libcurl4-openssl-dev ADD ci/install_php_custom.sh ci/generate_php_install_dir.sh ci/ ARG PHP_VERSION_FULL ARG PHP_CONFIGURE_ARGS="--disable-all --enable-zts --enable-debug --enable-cgi --enable-session --enable-json --with-curl" ARG CFLAGS="-DZEND_RC_DEBUG=1" ENV PHP_CONFIGURE_ARGS=$PHP_CONFIGURE_ARGS PHP_CUSTOM_VERSION=$PHP_VERSION_FULL CFLAGS=$CFLAGS RUN ci/install_php_custom.sh # Assume compilation will be the time consuming step. # Add tests after compiling so that it's faster to update tests and re-run them locally. # (The ability to use custom install directories is useful for running tests locally outside docker) # TODO: Reorder # # NOTE: php 8.1 has a patch that may avoid the need to recompile php with --enable-valgrind, # but the PHP_CONFIGURE_ARGS overrides such as --enable-debug may still be useful RUN ln -nsf $(ci/generate_php_install_dir.sh) /php-valgrind-install ENV PATH=/php-valgrind-install/bin:$PATH # Used for running tests in Docker # RUN set -eux; . /etc/os-release; apt-get update && apt-get install -y $( [ "x${ID:-linux}" = "xdebian" ] && [ "x${VERSION_ID:-0}" = "x9" ] && echo "--allow-unauthenticated" ) valgrind && apt-get clean # NOTE: In order to avoid valgrind false positives, this would need to compile php from source and configure php --with-valgrind (php-src's zend_string_equals uses inline assembly that causes false positives) # - ci/install_php_custom.sh and ci/generate_php_install_dir.sh may be a useful reference for that. ADD *.sh *.c *.h *.php *.md config.m4 config.w32 package.xml COPYING CREDITS NEWS igbinary.spec igbinary.php.ini ./ ADD src ./src RUN export CFLAGS; phpize && ./configure $PHP_CONFIGURE_ARGS && make clean && make -j2 # RUN docker-php-ext-enable igbinary ADD tests ./tests ADD ci ./ci
Save File
Cancel