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

Host configuration and access #3

Open
AlexisBRENON opened this issue Nov 2, 2016 · 3 comments
Open

Host configuration and access #3

AlexisBRENON opened this issue Nov 2, 2016 · 3 comments
Assignees

Comments

@AlexisBRENON
Copy link

Hi,

$ docker run --rm -v $PWD:/usr/src/app -p 4000:4000 starefossen/github-pages:latest jekyll serve --config _config.yml,_config_local.yml

_config_local.yml contains

host: 0.0.0.0
port: 4000

Output:

Configuration file: _config.yml
Configuration file: _config_local.yml
            Source: /usr/src/app
       Destination: /usr/src/app/_site
 Incremental build: disabled. Enable with --incremental
      Generating... 
                    done in 0.808 seconds.
 Auto-regeneration: enabled for '/usr/src/app'
Configuration file: /usr/src/app/_config.yml
    Server address: http://127.0.0.1:4000/
  Server running... press ctrl-c to stop.

Result: generated site is inaccessible from the host via localhost:4000.

Workaround is to add --host 0.0.0.0 to the command line:

$ docker run --rm -v $PWD:/usr/src/app -p 4000:4000 starefossen/github-pages:latest jekyll serve --config _config.yml,_config_local.yml --host 0.0.0.0

Configuration file: _config.yml
Configuration file: _config_local.yml
            Source: /usr/src/app
       Destination: /usr/src/app/_site
 Incremental build: disabled. Enable with --incremental
      Generating... 
                    done in 0.813 seconds.
 Auto-regeneration: enabled for '/usr/src/app'
Configuration file: /usr/src/app/_config.yml
    Server address: http://0.0.0.0:4000/
  Server running... press ctrl-c to stop.

See configuration files

Kind regards,
Alexis.

@Starefossen
Copy link
Owner

Good catch @AlexisBRENON. We should probably add a note about this to the README. Would you like to make a Pull Request?

@AlexisBRENON
Copy link
Author

For sure, I can make a PR if necessary, but is there an elegant way to fix this without adding the --host option manually? An option in docker to translate requester IP or something like this...

@Starefossen Starefossen self-assigned this Nov 28, 2016
@Oliboy50
Copy link

Oliboy50 commented Nov 5, 2022

it seems that this issue should be closed now

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

3 participants