-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace
alpine
by debian
for GLPI CI images
- Loading branch information
1 parent
146c8ea
commit 46e4947
Showing
4 changed files
with
31 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
ARG BASE_IMAGE=php:fpm-alpine | ||
ARG BASE_IMAGE=php:fpm-bullseye | ||
|
||
|
||
##### | ||
|
@@ -18,32 +18,28 @@ LABEL \ | |
org.opencontainers.image.source="[email protected]:glpi-project/docker-images" | ||
|
||
RUN \ | ||
# Update APK package list. | ||
apk update \ | ||
\ | ||
# Install PHP build dependencies. | ||
&& apk add --virtual .build-deps $PHPIZE_DEPS \ | ||
# Update package list. | ||
apt update \ | ||
\ | ||
# Install exif extension. | ||
&& docker-php-ext-install exif \ | ||
\ | ||
# Install GD PHP extension. | ||
&& apk add freetype-dev libjpeg-turbo-dev libpng-dev libwebp-dev \ | ||
&& apt install --assume-yes --no-install-recommends --quiet libfreetype6-dev libjpeg-dev libpng-dev libwebp-dev \ | ||
&& docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp \ | ||
&& docker-php-ext-install gd \ | ||
\ | ||
# Install intl PHP extension. | ||
&& apk add icu-dev icu-data-full \ | ||
&& apt install --assume-yes --no-install-recommends --quiet libicu-dev \ | ||
&& docker-php-ext-install intl \ | ||
\ | ||
# Install ldap PHP extension. | ||
&& apk add --virtual .ldap-build-deps openldap-dev \ | ||
&& apk add libldap \ | ||
&& apt install --assume-yes --no-install-recommends --quiet libldap2-dev \ | ||
&& docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/ \ | ||
&& docker-php-ext-install ldap \ | ||
&& apk del -f .ldap-build-deps \ | ||
\ | ||
# Install memcached PHP extension. | ||
&& apk add libmemcached-dev \ | ||
&& apt install --assume-yes --no-install-recommends --quiet libmemcached-dev \ | ||
&& pecl install memcached \ | ||
&& docker-php-ext-enable memcached \ | ||
\ | ||
|
@@ -58,14 +54,12 @@ RUN \ | |
&& docker-php-ext-enable redis \ | ||
\ | ||
# Install Zip PHP extension. | ||
# Zip extension configuration changed on PHP 7.4 | ||
# see https://www.php.net/manual/en/zip.installation.php | ||
&& apk add libzip-dev \ | ||
&& apt install --assume-yes --no-install-recommends --quiet libzip-dev \ | ||
&& docker-php-ext-install zip \ | ||
\ | ||
# Install XMLRPC PHP extension. | ||
# Install from Github (extension should be available on PECL but is not) | ||
&& apk add libxml2-dev \ | ||
&& apt install --assume-yes --no-install-recommends --quiet libxml2-dev \ | ||
&& mkdir -p /tmp/xmlrpc \ | ||
&& (curl -LsfS https://github.com/php/pecl-networking-xmlrpc/archive/0f782ffe52cebd0a65356427b7ab72d48b72d20c/xmlrpc-0f782ff.tar.gz | tar xvz -C "/tmp/xmlrpc" --strip 1) \ | ||
&& docker-php-ext-configure /tmp/xmlrpc --with-xmlrpc \ | ||
|
@@ -85,41 +79,32 @@ RUN \ | |
&& rm /usr/local/etc/php/conf.d/docker-php-ext-sodium.ini \ | ||
\ | ||
# Install nodejs and npm. | ||
&& apk add nodejs npm \ | ||
&& apt install --assume-yes --no-install-recommends --quiet gnupg \ | ||
&& mkdir -p /etc/apt/keyrings \ | ||
&& curl --fail --silent --show-error --location https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor --output /etc/apt/keyrings/nodesource.gpg \ | ||
&& echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list \ | ||
&& apt update \ | ||
&& apt install --assume-yes --no-install-recommends --quiet nodejs \ | ||
\ | ||
# Install git and zip used by composer when fetching dependencies. | ||
&& apk add git unzip \ | ||
\ | ||
# Install gettext and perl used to validate locales extraction. | ||
&& apk add gettext \ | ||
&& apk add perl \ | ||
\ | ||
# Install chromium-chromedriver used for front-end tests. | ||
&& apk add chromium-chromedriver \ | ||
\ | ||
# Install sudo that may be usefull to temporarly install upcoming required system components. | ||
&& apk add sudo \ | ||
&& (echo "glpi ALL=(ALL) NOPASSWD:ALL" | sudo tee /etc/sudoers.d/glpi) \ | ||
\ | ||
# Install bash that is used in some GLPI scripts. | ||
&& apk add bash \ | ||
&& apt install --assume-yes --no-install-recommends --quiet git unzip \ | ||
\ | ||
# Install patch utility that may be usefull to patch dependencies. | ||
&& apk add patch \ | ||
# Install gettext used for translation files. | ||
&& apt install --assume-yes --no-install-recommends --quiet gettext \ | ||
\ | ||
# Remove PHP build dependencies. | ||
&& apk del -f .build-deps \ | ||
# Install Cypress dependencies | ||
&& apt install --assume-yes --no-install-recommends --quiet libgtk2.0-0 libgtk-3-0 libgbm-dev libnotify-dev libnss3 libxss1 libasound2 libxtst6 xauth xvfb \ | ||
\ | ||
# Clean sources list. | ||
&& rm -rf /var/cache/apk/* | ||
# Clean sources list | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Copy composer binary | ||
COPY --from=composer /usr/bin/composer /usr/bin/composer | ||
|
||
# Create application volume (used to share data across jobs), | ||
# give its ownage to glpi user (1000:1000) and define it as base working dir | ||
RUN addgroup -g 1000 glpi \ | ||
&& adduser -D -h /home/glpi -G glpi -u 1000 glpi \ | ||
RUN addgroup -gid 1000 glpi \ | ||
&& useradd -m -d /home/glpi -g glpi -u 1000 glpi \ | ||
&& mkdir -p /var/glpi \ | ||
&& chown glpi:glpi /var/glpi | ||
USER glpi | ||
|