Skip to content

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Thoughtscript
Copy link

@Thoughtscript Thoughtscript commented May 30, 2025

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:

  • New make command specific to Docker - binds to 0.0.0.0 locally to expose through Docker.
  • dockerfile and testing.
  • Documentation

Browser:
Screenshot 2025-05-30 115726

Docker:
Screenshot 2025-05-30 115747


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

@plaindocs
Copy link
Contributor

Hey @Thoughtscript this is pretty cool. I especially like how you've reused the make script.

Copy link
Contributor

@plaindocs plaindocs left a 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:
Copy link
Contributor

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
Copy link
Contributor

Choose a reason for hiding this comment

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

Definitely worth clarifying here.

Comment on lines +1 to +5
#!/usr/bin/env bash

cd docs && make dockerhtml &

wait
Copy link
Contributor

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?

Comment on lines +116 to +120
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
Copy link
Contributor

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?

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.

2 participants