1
0
Fork 0
mirror of https://codeberg.org/icewind/haze.git synced 2026-06-03 17:14:08 +02:00

split debug images

This commit is contained in:
Robin Appelman 2022-03-10 00:16:00 +01:00
commit be043b00ae
5 changed files with 37 additions and 11 deletions

View file

@ -1,15 +1,21 @@
#!/bin/bash #!/bin/bash
set -e
versions=("7.3" "7.4" "8.0" "8.1") versions=("7.3" "7.4" "8.0" "8.1")
for version in "${versions[@]}"; do for version in "${versions[@]}"; do
echo "building haze-php-$version" echo "building haze-php-$version"
docker build --build-arg BASE_IMAGE=icewind1991/php-dbg --build-arg PHP_VERSION=$version -t "icewind1991/haze-php:$version" -f "php/Dockerfile" php docker build --build-arg PHP_VERSION=$version -t "icewind1991/haze-php:$version" -f "php/Dockerfile" php
echo "building haze-php-$version-dbg"
docker build --build-arg BASE_IMAGE=icewind1991/php-dbg --build-arg PHP_VERSION=$version -t "icewind1991/haze-php:$version-dbg" -f "php/Dockerfile" php
done done
for version in "${versions[@]}"; do for version in "${versions[@]}"; do
echo "building haze-$version" echo "building haze-$version"
docker build --build-arg PHP_VERSION=$version -t "icewind1991/haze:$version" -f "haze/Dockerfile" haze docker build --build-arg PHP_VERSION=$version -t "icewind1991/haze:$version" -f "haze/Dockerfile" haze
echo "building haze-$version-dbg"
docker build --build-arg PHP_VERSION=$version-dbg -t "icewind1991/haze:$version-dbg" -f "haze/Dockerfile" haze
done done
docker build -t "icewind1991/haze-ldap" -f "ldap/Dockerfile" ldap docker build -t "icewind1991/haze-ldap" -f "ldap/Dockerfile" ldap

View file

@ -9,7 +9,6 @@ RUN DEBIAN_FRONTEND=noninteractive ;\
redis-server \ redis-server \
smbclient \ smbclient \
npm \ npm \
chromium \
sudo \ sudo \
wget \ wget \
attr \ attr \

View file

@ -63,20 +63,21 @@ RUN pecl install apcu \
&& export VERSION=`php -r "echo PHP_MAJOR_VERSION.PHP_MINOR_VERSION;"` \ && export VERSION=`php -r "echo PHP_MAJOR_VERSION.PHP_MINOR_VERSION;"` \
&& curl -A "Docker" -o /tmp/blackfire-probe.tar.gz -D - -L -s https://blackfire.io/api/v1/releases/probe/php/linux/amd64/${VERSION} \ && curl -A "Docker" -o /tmp/blackfire-probe.tar.gz -D - -L -s https://blackfire.io/api/v1/releases/probe/php/linux/amd64/${VERSION} \
&& tar zxpf /tmp/blackfire-probe.tar.gz -C /tmp \ && tar zxpf /tmp/blackfire-probe.tar.gz -C /tmp \
&& mv /tmp/blackfire-*.so `php -r "echo ini_get('extension_dir');"`/blackfire.so \ && mv /tmp/blackfire-*.so `php -r "echo ini_get('extension_dir');"`/blackfire.so
&& echo "extension=imagick.so" > $PHP_INI_DIR/conf.d/imagick.ini \
&& echo "extension=smbclient.so" > $PHP_INI_DIR/conf.d/smbclient.ini \ ARG BASE_IMAGE
RUN echo "extension=imagick.so" > $PHP_INI_DIR/conf.d/imagick.ini \
&& sh -c 'if [ "$BASE_IMAGE" = "php" ]; then echo "extension=smbclient.so" > $PHP_INI_DIR/conf.d/smbclient.ini; fi' \
&& sh -c 'if [ "$BASE_IMAGE" = "php" ]; then echo "extension=blackfire.so\nblackfire.agent_socket=\${BLACKFIRE_PORT}" > $PHP_INI_DIR/conf.d/blackfire.ini; fi' \
&& echo "extension=inotify.so" > $PHP_INI_DIR/conf.d/inotify.ini \ && echo "extension=inotify.so" > $PHP_INI_DIR/conf.d/inotify.ini \
# && echo "extension=blackfire.so\nblackfire.agent_socket=\${BLACKFIRE_PORT}" > $PHP_INI_DIR/conf.d/blackfire.ini \
&& echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > $PHP_INI_DIR/conf.d/xdebug.ini \ && echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > $PHP_INI_DIR/conf.d/xdebug.ini \
&& echo "xdebug.mode=debug,trace,profile" >> $PHP_INI_DIR/conf.d/xdebug.ini \ && echo "xdebug.mode=debug,trace,profile" >> $PHP_INI_DIR/conf.d/xdebug.ini \
&& echo "xdebug.start_with_request=trigger" >> $PHP_INI_DIR/conf.d/xdebug.ini \ && echo "xdebug.start_with_request=trigger" >> $PHP_INI_DIR/conf.d/xdebug.ini \
&& echo "xdebug.discover_client_host=true" >> $PHP_INI_DIR/conf.d/xdebug.ini \ && echo "xdebug.discover_client_host=true" >> $PHP_INI_DIR/conf.d/xdebug.ini \
&& echo "xdebug.client_host=hazehost" >> $PHP_INI_DIR/conf.d/xdebug.ini \ && echo "xdebug.client_host=hazehost" >> $PHP_INI_DIR/conf.d/xdebug.ini \
&& echo "xdebug.log_level=0" >> $PHP_INI_DIR/conf.d/xdebug.ini \ && echo "xdebug.log_level=0" >> $PHP_INI_DIR/conf.d/xdebug.ini \
&& echo "memory_limit = 512M" > $PHP_INI_DIR/conf.d/memory_limit.ini && echo "memory_limit = 512M" > $PHP_INI_DIR/conf.d/memory_limit.ini \
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer
ADD apcu.ini opcache.ini redis.ini $PHP_INI_DIR/conf.d/ ADD apcu.ini opcache.ini redis.ini $PHP_INI_DIR/conf.d/

View file

@ -1,6 +1,8 @@
#!/bin/bash #!/bin/bash
versions=("7.2" "7.3" "7.4" "8.0") set -e
versions=("7.3" "7.4" "8.0" "8.1" "7.3-dbg" "7.4-dbg" "8.0-dbg" "8.1-dbg")
for version in "${versions[@]}"; do for version in "${versions[@]}"; do
docker push "icewind1991/haze-php:$version" docker push "icewind1991/haze-php:$version"

View file

@ -20,6 +20,10 @@ pub enum PhpVersion {
Php80, Php80,
Php74, Php74,
Php73, Php73,
Php81Dbg,
Php80Dbg,
Php74Dbg,
Php73Dbg,
} }
impl FromStr for PhpVersion { impl FromStr for PhpVersion {
@ -30,9 +34,15 @@ impl FromStr for PhpVersion {
"7" => Ok(PhpVersion::Php74), "7" => Ok(PhpVersion::Php74),
"7.3" => Ok(PhpVersion::Php73), "7.3" => Ok(PhpVersion::Php73),
"7.4" => Ok(PhpVersion::Php74), "7.4" => Ok(PhpVersion::Php74),
"8" => Ok(PhpVersion::Php80), "8" => Ok(PhpVersion::Php81),
"8.0" => Ok(PhpVersion::Php80), "8.0" => Ok(PhpVersion::Php80),
"8.1" => Ok(PhpVersion::Php81), "8.1" => Ok(PhpVersion::Php81),
"7-dbg" => Ok(PhpVersion::Php74Dbg),
"7.3-dbg" => Ok(PhpVersion::Php73Dbg),
"7.4-dbg" => Ok(PhpVersion::Php74Dbg),
"8-dbg" => Ok(PhpVersion::Php80Dbg),
"8.0-dbg" => Ok(PhpVersion::Php80Dbg),
"8.1-dbg" => Ok(PhpVersion::Php81Dbg),
_ => Err(()), _ => Err(()),
} }
} }
@ -46,6 +56,10 @@ impl PhpVersion {
PhpVersion::Php74 => "icewind1991/haze:7.4", PhpVersion::Php74 => "icewind1991/haze:7.4",
PhpVersion::Php80 => "icewind1991/haze:8.0", PhpVersion::Php80 => "icewind1991/haze:8.0",
PhpVersion::Php81 => "icewind1991/haze:8.1", PhpVersion::Php81 => "icewind1991/haze:8.1",
PhpVersion::Php73Dbg => "icewind1991/haze:7.3-dbg",
PhpVersion::Php74Dbg => "icewind1991/haze:7.4-dbg",
PhpVersion::Php80Dbg => "icewind1991/haze:8.0-dbg",
PhpVersion::Php81Dbg => "icewind1991/haze:8.1-dbg",
} }
} }
@ -55,6 +69,10 @@ impl PhpVersion {
PhpVersion::Php74 => "7.4", PhpVersion::Php74 => "7.4",
PhpVersion::Php80 => "8.0", PhpVersion::Php80 => "8.0",
PhpVersion::Php81 => "8.1", PhpVersion::Php81 => "8.1",
PhpVersion::Php73Dbg => "7.3-dbg",
PhpVersion::Php74Dbg => "7.4-dbg",
PhpVersion::Php80Dbg => "8.0-dbg",
PhpVersion::Php81Dbg => "8.1-dbg",
} }
} }