title: Hugo server in Docker container not reachable in Windows 10
body: <p>A few days ago I started a little side project: Dockerizing my Hugo build on my Windows 10 machine. The Hugo container itself, which runs as a Linux container, was the easy part and seems to work (at least by looking at the console output</p>
  
  <pre><code>$ docker run --rm -it -p 1313:1313/tcp hugo:latest
  Building sites … 
    Replace Autoprefixer browsers option to Browserslist config.
    Use browserslist key in package.json or .browserslistrc file.
  
    Using browsers option cause some error. Browserslist config 
    can be used for Babel, Autoprefixer, postcss-normalize and other tools.
  
    If you really need to use option, rename it to overrideBrowserslist.   
  
    Learn more at:
    https://github.com/browserslist/browserslist#readme
    https://twitter.com/browserslist
  
  
  WARN 2019/11/23 14:05:35 found no layout file for "HTML" for "section": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
  
                     | DE | EN  
  +------------------+----+----+
    Pages            |  9 |  7
    Paginator pages  |  0 |  0
    Non-page files   |  0 |  0
    Static files     | 25 | 25
    Processed images |  0 |  0
    Aliases          |  1 |  0
    Sitemaps         |  2 |  1
    Cleaned          |  0 |  0
  
  Total in 680 ms
  Watching for changes in /app/{assets,content,i18n,layouts,static}
  Watching for config changes in /app/config.yaml
  Environment: "development"
  Serving pages from memory
  Running in Fast Render Mode. For full rebuilds on change: hugo server --disableFastRender
  Web Server is available at http://localhost:1313/ (bind address 127.0.0.1)
  Press Ctrl+C to stop
  </code></pre>
  
  <p>My Dockerfile the I run looks like this</p>
  
  <pre><code>FROM node:13-alpine
  ENV VERSION 0.59.1
  
  EXPOSE 1313
  RUN apk add --no-cache git openssl py-pygments libc6-compat g++ curl 
  RUN curl -L https://github.com/gohugoio/hugo/releases/download/v${VERSION}/hugo_extended_${VERSION}_Linux-64bit.tar.gz | tar -xz  \
    &amp;&amp; cp hugo /usr/bin/hugo \
    &amp;&amp; apk del curl \
    &amp;&amp; hugo version
  WORKDIR /app
  
  COPY assets assets
  COPY content content
  COPY i18n i18n
  COPY layouts layouts
  COPY static static
  COPY package.json package.json
  COPY postcss.config.js postcss.config.js
  COPY config.yaml config.yaml
  
  RUN yarn
  
  CMD [ "hugo", "server", "--buildDrafts","--watch" ]
  </code></pre>
  
  <p>The hard part for me now is to connect to the running Hugo server on my host's systems (Windows 10 Pro) browser.
  I basically tried everything: <code>localhost:1313</code> &amp; <code>http://172.17.0.2:1313/</code> (the container IP I get by running <code>docker inspect &lt;container ID&gt;</code>), with firewall enabled and disabled, but nothing seems to work.</p>
  
  <p>To verify that it should work I ran <code>hugo server --buildDrafts --watch</code> directly on my host system and can access the server just fine. I also invested several hours in reading up on the issue, but none of the solutions seem to work in my case. </p>
  
  <p>How can I solve this issue?</p>