Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker-compose build failed #14

Open
pkix opened this issue Mar 30, 2017 · 1 comment
Open

docker-compose build failed #14

pkix opened this issue Mar 30, 2017 · 1 comment

Comments

@pkix
Copy link

pkix commented Mar 30, 2017

Hi there,

When running the command docker-compose build, it's failed with ERROR: Service 'ctobservatory' failed to build: The command '/bin/sh -c pip install -r /observatory/requirements.txt' returned a non-zero code: 1, does anyone who knows what's going on? thanks.

@malte-nyanbinary
Copy link
Collaborator

malte-nyanbinary commented Aug 6, 2017

Encountering a similar/the same problem, here is the full output of docker-compose build:

user@machine:~/git/ct-infrastructure$ docker-compose build
Building ctdatabase
Step 1 : FROM postgres:9.5
 ---> a5fb977685db
Step 2 : MAINTAINER sz
 ---> Using cache
 ---> 68ed22e9c225
Step 3 : COPY ./database/config.sh /config.sh
 ---> Using cache
 ---> 52baadf76bfe
Step 4 : COPY ./database/reset.sh /reset.sh
 ---> Using cache
 ---> f5d7e5912cf9
Step 5 : COPY ./database/python_monitor_schema.sql /python_monitor_schema.sql
 ---> Using cache
 ---> fe394dd322b7
Step 6 : ENV libdir 
 ---> Using cache
 ---> 6acc637ce527
Step 7 : RUN chmod 700 -R /var/lib/postgresql/data
 ---> Using cache
 ---> 0ef75d4417d7
Successfully built 0ef75d4417d7
Building ctobservatory
Step 1 : FROM httpd:2.4
 ---> e74fcb59d25b
Step 2 : MAINTAINER ct
 ---> Using cache
 ---> 9c3c1dc811ca
Step 3 : RUN apt-get update &&     apt-get install -y apache2-dev libpq-dev libffi-dev gcc postgresql-client libpq-dev python3 python3-dev python3-pip wget --no-install-recommends
 ---> Running in 34b21eda6644
Get:1 http://security.debian.org jessie/updates InRelease [63.1 kB]
Get:2 http://security.debian.org jessie/updates/main amd64 Packages [549 kB]
Ign http://deb.debian.org jessie InRelease
Get:3 http://deb.debian.org jessie-updates InRelease [145 kB]
Get:4 http://deb.debian.org jessie-backports InRelease [166 kB]
Ign http://deb.debian.org stretch InRelease
Get:5 http://deb.debian.org jessie Release.gpg [2373 B]
Get:6 http://deb.debian.org stretch Release.gpg [2373 B]
Get:7 http://deb.debian.org jessie Release [148 kB]
Get:8 http://deb.debian.org stretch Release [118 kB]
Get:9 http://deb.debian.org jessie-updates/main amd64 Packages [17.8 kB]
Get:10 http://deb.debian.org jessie-backports/main amd64 Packages [1169 kB]
Get:11 http://deb.debian.org jessie/main amd64 Packages [9063 kB]
Get:12 http://deb.debian.org stretch/main amd64 Packages [9497 kB]
Fetched 20.9 MB in 2min 4s (169 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libpq-dev : Depends: libssl-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
ERROR: Service 'ctobservatory' failed to build: The command '/bin/sh -c apt-get update &&     apt-get install -y apache2-dev libpq-dev libffi-dev gcc postgresql-client libpq-dev python3 python3-dev python3-pip wget --no-install-recommends' returned a non-zero code: 100

The problem seems to be somewhere with libpq-devs dependencies. When adding libssl-dev to Step 3 of observatory/Dockerfile one will encounter another error:

The following packages have unmet dependencies:
 libssl-dev : Depends: libssl1.0.0 (= 1.0.1t-1+deb8u6) but 1.0.2l-1~bpo8+1 is to be installed
E: Unable to correct problems, you have held broken packages.

A dirty fix for this would be downgrading to the specified version of libssl1.0.0, Step 3 of observatory/Dockerfile:

RUN apt-get update && \
    apt-get install -y --force-yes apache2-dev libffi-dev gcc postgresql-client libpq-dev libssl-dev libssl1.0.0=1.0.1t-1+deb8u6 python3 python3-dev python3-pip wget --no-install-recommends

This is definitely not a recommended way of fixing this and I am not even sure if this really fixes it (I am still encountering a few errors later in the build process) but at least it gets you half way through the building process.

Edit: This does lead to problems when running the observatory:

user@machine:~/git/ct-infrastructure$ docker logs ctinfrastructure_ctobservatory_1 
httpd: Syntax error on line 133 of /usr/local/apache2/conf/httpd.conf: Cannot load modules/mod_ssl.so into server: /usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0: version `OPENSSL_1.0.2' not found (required by /usr/local/apache2/modules/mod_ssl.so)

so this really should just be seen as a way to continue the build process, not as a way to make it useable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants