Skip to content

Conversation

maxhbr
Copy link
Member

@maxhbr maxhbr commented Apr 6, 2019

Description

Bump docker base image from jessie to stretch, to get rid of the php-5 dependency as suggested on the mailing list by @NicolasToussaint.

How to test

test the docker image

@NicolasToussaint
Copy link
Member

Thanks @maxhbr

I tested the Dockerfile, and noticed plenty of errors when installing php dependencies, below is an extract from the install logs.

/usr/bin/install -D -m 644 composer.json composer.lock /usr/local/share/fossology
(cd /usr/local/share/fossology; export COMPOSER_HOME=/dev/null; composer install --no-plugins --no-scripts --no-dev)
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Loading composer repositories with package information
Installing dependencies from lock file
Package operations: 25 installs, 0 updates, 0 removals
    Failed to download easyrdf/easyrdf from dist: The zip extension and unzip command are both missing, skipping.
The php.ini used by your command-line PHP is: /etc/php/7.0/cli/php.ini
    Now trying to download from source
  - Installing easyrdf/easyrdf (0.9.1): Cloning acd09dfe05
    Failed to download firebase/php-jwt from dist: The zip extension and unzip command are both missing, skipping.
The php.ini used by your command-line PHP is: /etc/php/7.0/cli/php.ini
    Now trying to download from source
  - Installing firebase/php-jwt (v5.0.0): Cloning 9984a4d3a3
    Failed to download psr/container from dist: The zip extension and unzip command are both missing, skipping.

However, I did not detect any problem while testing the image ; the unzip tool is installed in the final image nonetheless.

Adding the installation of zip and unzip commands directly in the Dockerfile did allow to remove the above errors during the build.

diff --git a/Dockerfile b/Dockerfile
index e7ddc0c..784ad03 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -21,6 +21,7 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update \
       lsb-release \
       php7.0-cli \
       sudo \
+         zip unzip \
  && rm -rf /var/lib/apt/lists/*
 
 COPY ./utils/fo-installdeps ./utils/fo-installdeps

xenial)
apt-get $YesOpt install php-mbstring;;
stretch|buster|sid)
apt-get $YesOpt install php-mbstring php7.0-xml;;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@maxhbr how about adding php-zip here?

@maxhbr
Copy link
Member Author

maxhbr commented Apr 8, 2019

@NicolasToussaint the dependency should be added, please retest

@maxhbr maxhbr added this to the 3.5.0 milestone Apr 9, 2019
@mcjaeger mcjaeger merged commit 1eea568 into fossology:master Apr 9, 2019
@ghost ghost removed the needs code review label Apr 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants