Docker Community Forums

Share and learn in the Docker community.

Accessing container port from the outside fails


(Toogley) #1


I have this Dockerfile:

FROM fedora:latest

RUN dnf update --assumeyes
RUN dnf install --assumeyes ruby-devel
RUN dnf install --assumeyes rubygems
RUN dnf install --assumeyes rubygems-devel
RUN dnf install --assumeyes libffi
RUN dnf install --assumeyes libffi-devel

# jekyll things 
RUN  dnf install --assumeyes rubygem-jekyll
RUN  dnf install --assumeyes rubygem-rb-inotify
RUN  gem install jekyll-gist
RUN  gem install jekyll-paginate
RUN  gem install jekyll-sass-converter
RUN  gem install jekyll-sitemap

# tools
RUN dnf install --assumeyes git
RUN dnf install --assumeyes tmux

RUN git clone

RUN ["/bin/bash"]

After the following steps:
$ sudo docker build -t fedora-jekyll .
$ sudo docker run --publish-all=true -it fedora-jekyll /bin/bash
[root@014b16f40ef4 /]# cd && jekyll serve
Configuration file: /
Configuration file: /
Source: .
Destination: ./_site
Incremental build: disabled. Enable with --incremental
Liquid Warning: Liquid syntax error (line 18): Unexpected character / in “{{}}” in feed.xml
done in 6.408 seconds.
Auto-regeneration: enabled for '.'
Configuration file: /
Server address:
Server running… press ctrl-c to stop.

i can’t access the url from the host, but i can from inside the container. How can i fix this?