the logo link redirect to 0.0.0.0:8000 when run mkdocs material by docker
- run mkdocs material on docker in remote host:
#login to remote host
ssh 192.168.10.100
#start mkdocs-material server
sudo docker run -d --name abc -v /tmp/abc:/docs -p 5800:8000 --workdir /docs squidfunk/mkdocs-material serve -a 0.0.0.0:8000
- view the mkdocs via another machine:

Web page can be displayed normally.
- view the logo link tag value:


The logo button href attribute is not expected.
- click the logo button
When I click the button , the chrome tells me can not open this page.

My question is how to fix is this problem.Please help me...Thanks a lot...
Please read https://github.com/squidfunk/mkdocs-material/issues/238#issuecomment-367486396 and https://github.com/mkdocs/mkdocs/issues/1239#issuecomment-307383410
Please read #238 (comment) and mkdocs/mkdocs#1239 (comment)
Thank you very much , squidfunk . I have already read the comments before.
Change the site_url value could not solve my problem.
So I am really confused.
How can I correctly deploy the mkdocs material on docker , so I can fix the logo link problem, When I use the remote ip open the mkdocs webpage , click the logo link can redirect to the correct ip address.
If I need custom the header.html?
Thanks .
That's the point - it should not be deployed. You shouldn't run the Docker container in production. From the second comment:
MkDocs is a static site generator. Its intended use case is to generate static files which are deployed by being uploaded to a static file server. You could use AWS' static file server (see their docs), or if you already have an nginx instance running, you could point it at a directory of static files (see those docs). In either case, run mkdocs build and then copy the contents of the site directory to the appropriate location on your server. That is the only type of deployment we support. Any other type of deployment is out of scope for MkDcos, and not something we can help with.
Thank you very much , squidfunk . So I need change the deploy method. I am clear now.Thanks.
@squidfunk Sorry, maybe I missed something but what's the answer for local run via Docker? When I do
docker run --rm -it -p 8000:8000 -v ${PWD}:/docs squidfunk/mkdocs-material serve
I just get the "0.0.0.0" error when clicking the logo.
Just drop the serve (as it's the default) or add the dev address as in:
https://github.com/squidfunk/mkdocs-material/blob/9a0c3e9094256a41d695da00afca733201406f43/Dockerfile#L57
I wanted to achieve running on localhost:8000 and keeping me on localhost:8000 after clicking the home link. As per our Gitter discussion, this is currently only possibly by overriding the partial, like this:
In overrides/partials/header.html:
<!-- Link to home -->
<a
href="/"
title="{{ config.site_name }}"
class="md-header-nav__button md-logo"
aria-label="{{ config.site_name }}"
>
{% include "partials/logo.html" %}
</a>
(I only need "/" so I removed the original, more complex expression including site_url.)