Docker image does not follow the entrypoint consistency requirements
alonsomoya opened this issue · comments
Contribution guidelines
- I've read the contribution guidelines and wholeheartedly agree
I've found a bug and checked that ...
- ... the problem doesn't occur with the
mkdocs
orreadthedocs
themes - ... the problem persists when all overrides are removed, i.e.
custom_dir
,extra_javascript
andextra_css
- ... the documentation does not mention anything about my problem
- ... there are no open or closed issues that are related to my problem
Description
The docker image does not follow the entrypoint consistency requirements
due to
# Dockerfile
# Start development server by default
ENTRYPOINT ["mkdocs"]
CMD ["serve", "--dev-addr=0.0.0.0:8000"]
which most likely will make all docker-in-docker jenkins implementations fail with a
ERROR: The container started but didn't run the expected command. Please double check your ENTRYPOINT does execute the command passed as docker run argument, as required by official docker images (see https://github.com/docker-library/official-images#consistency for entrypoint consistency requirements).
Expected behaviour
I'm able to run docker run squidfunk/mkdocs-material bash
without overwriting the entrypoint
Actual behaviour
❯ docker run squidfunk/mkdocs-material bash
Usage: mkdocs [OPTIONS] COMMAND [ARGS]...
Try 'mkdocs -h' for help.
Error: No such command 'bash'.
Steps to reproduce
docker run squidfunk/mkdocs-material bash
Package versions
- Python:
python --version
- MkDocs:
mkdocs --version
- Material:
pip show mkdocs-material | grep -E ^Version
Configuration
N/A
System information
- Operating system: Ubuntu
Thanks for reporting. I'm not sure I fully understand what's wrong with the current entrypoint. However, please note that the image is provided for convenience and for authoring documentation locally without the need to install anything. In CI, the recommended way is to use pip
to install any dependencies, as we also recommend in our documentation.
Please elaborate on what you feel is wrong, and what you think would be the right approach. Furthermore, please explain how your desired approach would change the commands we list in the docs, specifically:
docker run --rm -it -v ${PWD}:/docs squidfunk/mkdocs-material new .
docker run --rm -it -p 8000:8000 -v ${PWD}:/docs squidfunk/mkdocs-material
docker run --rm -it -v ${PWD}:/docs squidfunk/mkdocs-material build
Closing as stale. If you feel that the Docker image can be improved, I invite you to submit a PR where we can discuss concrete measures. I have no plan to change anything on that front myself, as I'm not really seeing what you're describing.