Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add entrypoint to build the docs and serve them over http #2

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

mrakitin
Copy link
Member

@mrakitin mrakitin commented Jul 24, 2019

To be used as:

$ docker run -it --rm -p 8000:8000 -v $PWD:/tmp/bin/ mrakitin/mpl-docker:latest bash /tmp/bin/entrypoint.sh

Cloning of the MPL repo may take a long time, but once it's done, it will install the package in the dev-mode, will build the docs and will start serving them from the docs/build/html/ directory.

Access on the host machine: http://localhost:8000

A note to myself: this entrypoint.sh script should be made a part of the Docker image, so can be executed without mounting.

attn @tacaswell

@matthewfeickert
Copy link
Contributor

matthewfeickert commented Jul 12, 2020

@tacaswell @QuLogic If this is still of interest to be able to build the docs in this Docker image I can have the CI system that I showed in the SciPy sprints Slack chat do this and then deploy the built docs to wherever.

Cloning of the MPL repo may take a long time

The actions/checkout option makes this very fast. c.f. screenshot of working built in CI:

matplotlib_docs_build

Copy link
Member

@QuLogic QuLogic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we make this the ENTRYPOINT? I'm not sure what our overall aim is for the container, tbh...

mrakitin and others added 2 commits July 20, 2020 16:56
Co-authored-by: Elliott Sales de Andrade <[email protected]>
Co-authored-by: Elliott Sales de Andrade <[email protected]>
@mrakitin
Copy link
Member Author

Thanks for the enhancement suggestions, @QuLogic! I accepted them. Would be great to have a proper Docker Entrypoint. Something like https://github.com/conda-forge/docker-images/blob/fe1a5326926fd75bb90bfa7bfe9e39e6509ab9f1/linux-anvil-comp7/Dockerfile#L49-L58?

@matthewfeickert
Copy link
Contributor

Would be great to have a proper Docker Entrypoint. Something like https://github.com/conda-forge/docker-images/blob/fe1a5326926fd75bb90bfa7bfe9e39e6509ab9f1/linux-anvil-comp7/Dockerfile#L49-L58?

It is still a bit unclear to me what the intended use case of the Docker image is, but even if the purpose is only "build the docs" it seems like using the entrypoint.sh as ENTRYPOINT would be a bit heavy, as then if you wanted to use the image to build the docs locally you would have to override the ENTRYPOINT. Additionally, there are times when having the image clone down matplotlib might not be desirable. For example, if building the docs in CI, something like GitHub Actions's checkout action can be faster.

@mrakitin
Copy link
Member Author

Indeed, valid points. Maybe the originally suggested flexibility with the bash command is sufficient.

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

Successfully merging this pull request may close these issues.

3 participants