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

Make Docker build pass (problem with gcc failure, but could be more) #1

Closed
ScalaWilliam opened this Issue Mar 10, 2018 · 1 comment

Comments

Projects
None yet
2 participants
@ScalaWilliam
Owner

ScalaWilliam commented Mar 10, 2018

So that it doesn't crash and installs the requirements as expected.

Reproduced on Mac+Docker:

$ cd test-server && docker build -t test-server .
...
    src/blob.h:33:18: fatal error: git2.h: No such file or directory
    compilation terminated.
    error: command 'gcc' failed with exit status 1

    ----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-0BuNob/pygit2/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-ZTC5e7-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-0BuNob/pygit2/
The command '/bin/sh -c pip install -r /requirements.txt' returned a non-zero code: 1

I'll pay $15 to fix this under ScalaWilliam Work rules. Please say "I'm taking on this" to reserve this task to yourself. Posted also on: http://work.scalawilliam.com/dockerfile-requirements-build/

@ScalaWilliam ScalaWilliam changed the title from Fix Docker image build to Make Docker build pass (problem with gcc failure, but could be more) Mar 10, 2018

ScalaWilliam added a commit to ScalaWilliam/Work that referenced this issue Mar 10, 2018

@spelcaster

This comment has been minimized.

Contributor

spelcaster commented Mar 10, 2018

The libgit2 headers wasn't found in the container, this probably fix the issue

diff --git a/test-server/Dockerfile b/test-server/Dockerfile
index 61f38d6..7b7edcb 100644
--- a/test-server/Dockerfile
+++ b/test-server/Dockerfile
@@ -2,6 +2,8 @@ FROM jkarlos/git-server-docker
 
 # https://github.com/gliderlabs/docker-alpine/blob/master/docs/usage.md
 RUN apk add --no-cache \
+  libgit2 \
+  libgit2-dev \
   curl \
   python \
   python-dev \

spelcaster added a commit to spelcaster/aptgit that referenced this issue Mar 10, 2018

Install missing packages and fix pip requirement
- Installed missing libraries;
- Downgrade pygit to version 0.24.2 because it must have the same
  version as the libgit2 installed.

closes ScalaWilliam#1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment