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 build fails when installing dependency omniauth-google-oauth2 #1512

Open
hzrari opened this issue Feb 15, 2018 · 2 comments
Open

Docker build fails when installing dependency omniauth-google-oauth2 #1512

hzrari opened this issue Feb 15, 2018 · 2 comments
Labels

Comments

@hzrari
Copy link

hzrari commented Feb 15, 2018

Hi,
I am not able to build the docker container, i am facing this error:

Downloading omniauth-google-oauth2-0.4.1 revealed dependencies not in the API or
the lockfile (omniauth-oauth2 (>= 1.3.1), jwt (~> 1.5.2)).
Either installing with `--full-index` or running `bundle update
omniauth-google-oauth2` should fix the problem.

In Gemfile:
  omniauth-google-oauth2
The command '/bin/sh -c bash -x ${GITLAB_BUILD_DIR}/install.sh' returned a non-zero code: 34

in this step:

Step 7/15 : RUN bash -x ${GITLAB_BUILD_DIR}/install.sh ---> Running in 8ee404ceb3b5
This happens when running this line
+ sudo -HEu git bundle install -j4 --deployment --without development test aws

After investigations, it seems that it has something todo with ruby dependencies and there is some version conflicts :
https://gitlab.com/gitlab-org/gitlab-ce/commit/b60a14357f443445771ce486bc498188545cd62e

I am not very comfy with Gem and ruby, can you help please.

This is my version info:

ENV GITLAB_VERSION=9.0.4 \
    RUBY_VERSION=2.3 \
    GOLANG_VERSION=1.6.3 \
    GITLAB_SHELL_VERSION=5.0.0 \
    GITLAB_WORKHORSE_VERSION=1.4.2 \
    GITLAB_PAGES_VERSION=0.4.0 \
    GITLAB_USER="git" \
    GITLAB_HOME="/home/git" \
    GITLAB_LOG_DIR="/var/log/gitlab" \
    GITLAB_CACHE_DIR="/etc/docker-gitlab" \
    RAILS_ENV=production
root@debian:~/docker/src/docker-gitlab# git show
commit 7cc6e3a3eccb81cf4f3283bacf21a0768456a6df
Author: solidnerd <niclas@mietz.io>
Date:   Sun Apr 9 22:34:59 2017 +0200

    release 9.0.4

For now, we are not ready to upgrade to a new gitlab version

Regards

@hzrari
Copy link
Author

hzrari commented Feb 15, 2018

I manage to workaround the issue, bu fixing the bundle version and merge the fix, by tweeaking my local Dockerfile:

root@debian:~/docker/src/docker-gitlab# git diff Dockerfile
diff --git a/Dockerfile b/Dockerfile
index ed0c259..a6bb79d 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -43,11 +43,18 @@ RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv E1DD270288B4E60
  && update-locale LANG=C.UTF-8 LC_MESSAGES=POSIX \
  && locale-gen en_US.UTF-8 \
  && DEBIAN_FRONTEND=noninteractive dpkg-reconfigure locales \
- && gem install --no-document bundler \
+ && gem install --version '1.14.5' --no-document bundler \
  && rm -rf /var/lib/apt/lists/*

-COPY assets/build/ ${GITLAB_BUILD_DIR}/
-RUN bash ${GITLAB_BUILD_DIR}/install.sh
+COPY assets/build/ ${GITLAB_BUILD_DIR}/
+
+RUN sed -e '119ised -e "483,484d;487d" -i Gemfile.lock' -i "${GITLAB_BUILD_DIR}"/install.sh
+RUN sed -e '120ised -e "483i\\\tjwt \\\(~> 1.5.2\\\)" -i Gemfile.lock' -i "${GITLAB_BUILD_DIR}"/install.sh
+RUN sed -e '121ised -e "486i\\\tomniauth-oauth2 \\\(>= 1.3.1\\\)" -i Gemfile.lock' -i "${GITLAB_BUILD_DIR}"/install.sh
+RUN sed -e '122icat -n Gemfile.lock ; #exit 20;' -i "${GITLAB_BUILD_DIR}"/install.sh
+
+#RUN cat -n "${GITLAB_BUILD_DIR}"/install.sh
+RUN bash -x ${GITLAB_BUILD_DIR}/install.sh

 COPY assets/runtime/ ${GITLAB_RUNTIME_DIR}/
 COPY entrypoint.sh /sbin/entrypoint.sh

@stale
Copy link

stale bot commented May 7, 2020

This issue has been automatically marked as stale because it has not had any activity for the last 60 days. It will be closed if no further activity occurs during the next 7 days. Thank you for your contributions.

@stale stale bot added the wontfix label May 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant