-
Notifications
You must be signed in to change notification settings - Fork 520
feat: dockerize #2379
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
base: main
Are you sure you want to change the base?
feat: dockerize #2379
Conversation
Hey @Thoughtscript this is pretty cool. I especially like how you've reused the make script. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great. I've left a few suggestions or queries.
@@ -59,6 +59,9 @@ html: | |||
livehtml: | |||
sphinx-autobuild --port 8888 -j auto --watch _data -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/html | |||
|
|||
dockerhtml: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Worth commenting here that this is for use inside the Docker image, not externally to run it?
@@ -18,6 +18,7 @@ if "%1" == "help" ( | |||
echo.Please use `make ^<target^>` where ^<target^> is one of | |||
echo. html to make standalone HTML files | |||
echo. livehtml to make live HTML files to view the docs on a local web server | |||
echo. dockerhtml to make live HTML files and view through a local docker container |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Definitely worth clarifying here.
#!/usr/bin/env bash | ||
|
||
cd docs && make dockerhtml & | ||
|
||
wait |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't suppose we can fold this inside the Dockerfile and drop the file?
1. Build the Docker Image from the root directory with the command: `docker build .` | ||
1. Find the created Docker Image ID: `docker images` - something like: `sha256:123...` | ||
1. Run the Docker Image Container using that Image ID: `docker run -p 8888:8888 sha256:123...` | ||
1. Access the live site on <http://localhost:8888> through your web browser | ||
1. Both the Docker Container and Image will be present in Docker Desktop |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make sense to tag the dockerfile as wtd
on creation, and then run the tag? Probably not, you still need the image sha.
Is there no way to just say "run the image build from the current dir" without going around looking for the ID?
Hi! I went ahead and Dockerized the source code to make it easier to get setup locally (it'd probably need quite a bit more to be used in Production/Production-worthy).
Checklist:
make
command specific to Docker - binds to0.0.0.0
locally to expose through Docker.dockerfile
and testing.Browser:

Docker:

📚 Documentation preview 📚: https://writethedocs-www--2379.org.readthedocs.build/