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 up" fails #2911

Open
2 tasks done
pazz opened this issue Dec 24, 2024 · 5 comments
Open
2 tasks done

"docker compose up" fails #2911

pazz opened this issue Dec 24, 2024 · 5 comments
Labels

Comments

@pazz
Copy link
Contributor

pazz commented Dec 24, 2024

Have you checked that your issue isn't already filed?

  • I read through FAQ and searched through the past issues, none of which addressed my issue.
  • Yes, I have checked that this issue isn't already filed.

Bug description

The "recommended Approach" for local development fails

How to reproduce the bug

I am following the instructions under "Recommended Approach" in INSTALL.md but docker compose up fails on me.

Side-question: I used to just use the system-wide ruby environment and bundle exec jekyll serve as described in the jekyll docks. How come this theme became so demanding? (genuine question, not meant as a complaint). Is there a reason to keep the Gemfile.lock around? I noticed that when I deploy on our own gitlab server and build in CI, the build (using the dockre image provided here) fails unless I remove this file from the source first.

Error messages and logs

[~/website] bundle install          
[~/website] docker compose up
[+] Running 1/1
 ✔ Container website-jekyll-1  Recreated1.4s 
Attaching to jekyll-1
jekyll-1  | Entry point script running
jekyll-1  | fatal: not a git repository: /srv/jekyll/../.git/modules/website
jekyll-1 exited with code 128

What operating system are you using?

Linux

Where are you seeing the problem on?

Running locally with Docker (docker compose)

More info

This is on debian testing, docker just re-installed from the official repository:

Docker version 27.4.1, build b9d17ea
@pazz pazz added the bug label Dec 24, 2024
@george-gca
Copy link
Collaborator

I am following the instructions under "Recommended Approach" in INSTALL.md but docker compose up fails on me.

Are you creating a new site from scratch?

Side-question: I used to just use the system-wide ruby environment and bundle exec jekyll serve as described in the jekyll docks. How come this theme became so demanding? (genuine question, not meant as a complaint). Is there a reason to keep the Gemfile.lock around? I noticed that when I deploy on our own gitlab server and build in CI, the build (using the dockre image provided here) fails unless I remove this file from the source first.

What you mean by so demanding?

Long story short, our users were having a huge problem running the template locally on Windows 10+, so we decided to move our recommended approach to using devcontainers, this way it is easier to replicate the correct development environment. The same happens for the Gemfile.lock, out of the blue the template stopped working because one of its dependencies updated causing it to crash, and until a fix was issued for that library it kept crashing. Uploading Gemfile.lock is a good practice to ensure that the correct versions of the dependencies are used to make it work correctly.

Now we are trying to keep things more organized. Every new release we also update the libraries, also the docker image and the docker compose file to point to this new image. This way new users will always have working versions while we can ensure that users that do not update their code frequently with the latest version can also keep it working longer. But we only started doing this very recently.

In our CI we don't actually use the docker image we provide. We build the dependencies in the GitHub workflow, but it should work from the docker image also. Are you pointing to the correct image version?

@martingerdes
Copy link

martingerdes commented Dec 28, 2024

I am getting a different error, but am basically in the same boat. I am just trying to follow https://github.com/alshedivat/al-folio/blob/main/INSTALL.md
I have done "Recommended Approach" steps 1-6, and can open the (yet unmodified) git page of my repository.
I then ran the git clone command, "sudo apt-get install docker-compose" (I am on debian linux), "sudo docker-compose pull" and "sudo docker-compose up"
That last command fails with:
jekyll_1 | bundler: failed to load command: jekyll (/usr/local/bundle/bin/jekyll) jekyll_1 | /usr/local/bundle/gems/bundler-2.5.7/lib/bundler/definition.rb:596:in 'Bundler::Definition#materialize': Could not find nokogiri-1.17.2-x86_64-linux, google-protobuf-4.29.1-x86_64-linux, ffi-1.17.0-x86_64-linux-gnu in locally installed gems (Bundler::GemNotFound)

As far as I know about docker, it should not need anything more installed on the host system, making this an inconsistency in the pulled docker image.
I'll try playing around with the slim version and the build commands next. But I first wanted to give feedback that the recommended approach, following the documentation as precisely as possible, seems to be broken.

PS: it definitely has to be "docker-compose", not "docker compose" in those commands...

EDIT:
Setting it up without docker, I got my site running locally (adding GEM_HOME and modifying PATH in ~/.bashrc, setting up jekyll and bundler, then "sudo apt-get install jupyter", "bundle install", "bundle exec jekyll serve --livereload"). Even though that is supposed to be the more finicky solution compared to the prebuild docker image.

@jnbastoky
Copy link

It is failing for me as well. I'm getting the same error as @martingerdes.

@george-gca
Copy link
Collaborator

george-gca commented Dec 29, 2024

I just issued a new release and with it a new docker image. The tip of our repo had new dependencies that were not included in the v0.13.1. And just saying that here I noticed that I used the wrong version number lol (it should have been 0.14.0 instead of 0.13.2), but that's fine.

As soon as this workflow ends we should have a new docker image version (v0.13.2). Try updating your code to the latest release.

Also, we recommend using devcontainers with VSCode. It's the easier way to set up your dev environment locally.

@george-gca
Copy link
Collaborator

It didn't fix the issue. @pourmand1376 any ideas here?

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

4 participants