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

[question] docker-compose not working #223

Open
memsharded opened this issue Oct 10, 2022 · 7 comments
Open

[question] docker-compose not working #223

memsharded opened this issue Oct 10, 2022 · 7 comments

Comments

@memsharded
Copy link
Member

Trying to render the blog on Windows with Docker:

First, updated the docker-compose to:

diff --git a/docker-compose.yml b/docker-compose.yml
index c77acba..7b3f7e3 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -1,8 +1,9 @@
-jekyll:
-    image: jekyll/jekyll:pages
-    command: /bin/sh -c /srv/jekyll/serve.sh
-    ports:
-        - 4000:4000
-    volumes:
-        - .:/srv/jekyll
+services:
+    jekyll:
+        image: jekyll/jekyll:latest
+        command: /bin/sh -c /srv/jekyll/serve.sh
+        ports:
+            - 4000:4000
+        volumes:
+            - .:/srv/jekyll

But still obtaining

λ docker-compose up                                                                                                                                           
[+] Running 1/0                                                                                                                                               
 - Container conan-iogithubio-jekyll-1  Created                                                                                                          0.0s 
Attaching to conan-iogithubio-jekyll-1                                                                                                                        
conan-iogithubio-jekyll-1  | ruby 3.1.1p18 (2022-02-18 revision 53f5fc4236) [x86_64-linux-musl]                                                               
conan-iogithubio-jekyll-1  | Configuration file: /srv/jekyll/_config.yml                                                                                      
conan-iogithubio-jekyll-1  |             Source: /srv/jekyll                                                                                                  
conan-iogithubio-jekyll-1  |        Destination: /srv/jekyll/_site                                                                                            
conan-iogithubio-jekyll-1  |  Incremental build: disabled. Enable with --incremental                                                                          
conan-iogithubio-jekyll-1  |       Generating...                                                                                                              
conan-iogithubio-jekyll-1  |                     done in 11.785 seconds.                                                                                      
conan-iogithubio-jekyll-1  |                     Auto-regeneration may not work on some Windows versions.                                                     
conan-iogithubio-jekyll-1  |                     Please see: https://github.com/Microsoft/BashOnWindows/issues/216                                            
conan-iogithubio-jekyll-1  |                     If it does not work, please upgrade Bash on Windows or run Jekyll with --no-watch.                           
conan-iogithubio-jekyll-1  |  Auto-regeneration: enabled for '/srv/jekyll'                                                                                    
conan-iogithubio-jekyll-1  |                     ------------------------------------------------                                                             
conan-iogithubio-jekyll-1  |       Jekyll 4.2.2   Please append `--trace` to the `serve` command                                                              
conan-iogithubio-jekyll-1  |                      for any additional information or backtrace.                                                                
conan-iogithubio-jekyll-1  |                     ------------------------------------------------                                                             
conan-iogithubio-jekyll-1  | <internal:/usr/local/lib/ruby/site_ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require': cannot load such file -- webr
ick (LoadError)                                                                                                                                               
conan-iogithubio-jekyll-1  |    from <internal:/usr/local/lib/ruby/site_ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'                       
conan-iogithubio-jekyll-1  |    from /usr/gem/gems/jekyll-4.2.2/lib/jekyll/commands/serve/servlet.rb:3:in `<top (required)>'                                  
conan-iogithubio-jekyll-1  |    from /usr/gem/gems/jekyll-4.2.2/lib/jekyll/commands/serve.rb:179:in `require_relative'                                        
conan-iogithubio-jekyll-1  |    from /usr/gem/gems/jekyll-4.2.2/lib/jekyll/commands/serve.rb:179:in `setup'                                                   
conan-iogithubio-jekyll-1  |    from /usr/gem/gems/jekyll-4.2.2/lib/jekyll/commands/serve.rb:100:in `process'                                                 
conan-iogithubio-jekyll-1  |    from /usr/gem/gems/jekyll-4.2.2/lib/jekyll/command.rb:91:in `block in process_with_graceful_fail'                             
conan-iogithubio-jekyll-1  |    from /usr/gem/gems/jekyll-4.2.2/lib/jekyll/command.rb:91:in `each'                                                            
conan-iogithubio-jekyll-1  |    from /usr/gem/gems/jekyll-4.2.2/lib/jekyll/command.rb:91:in `process_with_graceful_fail'                                      
conan-iogithubio-jekyll-1  |    from /usr/gem/gems/jekyll-4.2.2/lib/jekyll/commands/serve.rb:86:in `block (2 levels) in init_with_program'                    
conan-iogithubio-jekyll-1  |    from /usr/gem/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `block in execute'                                         
conan-iogithubio-jekyll-1  |    from /usr/gem/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `each'                                                     
conan-iogithubio-jekyll-1  |    from /usr/gem/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `execute'                                                  
conan-iogithubio-jekyll-1  |    from /usr/gem/gems/mercenary-0.4.0/lib/mercenary/program.rb:44:in `go'                                                        
conan-iogithubio-jekyll-1  |    from /usr/gem/gems/mercenary-0.4.0/lib/mercenary.rb:21:in `program'                                                           
conan-iogithubio-jekyll-1  |    from /usr/gem/gems/jekyll-4.2.2/exe/jekyll:15:in `<top (required)>'                                                           
conan-iogithubio-jekyll-1  |    from /usr/gem/bin/jekyll:25:in `load'                                                                                         
conan-iogithubio-jekyll-1  |    from /usr/gem/bin/jekyll:25:in `<main>'                                                                                       
conan-iogithubio-jekyll-1 exited with code 1                                                                                                                  

Am I missing something? What are you using to render the blog @uilianries @prince-chrismc ?

@prince-chrismc
Copy link
Contributor

Linux and MacOS have really easy ruby installs, haven't tried this on Windows

@memsharded
Copy link
Member Author

Yep, but the ruby install happens inside the docker, so it shouldn't be an issue?

@czoido
Copy link
Contributor

czoido commented Oct 11, 2022

I use:

docker run --rm --label=jekyll --volume=$(pwd):/srv/jekyll  -it -p 4000:4000 jekyll/jekyll:3.5 jekyll serve --future

Maybe that works for you

@memsharded
Copy link
Member Author

Yes, that works, maybe it is related to the specific image version. Many thanks!

@prince-chrismc
Copy link
Contributor

Yep, but the ruby install happens inside the docker, so it shouldn't be an issue?

I don't use docker :) I just use the system apt or brew ones

@uilianries
Copy link
Member

I don't use docker :) I just use the system apt or brew ones

Traitor! You should burn! 😝

@uilianries
Copy link
Member

It seems related to the version indeed.

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

4 participants