Skip to content
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

Dockerize development environment #142

Closed
wants to merge 1 commit into from
Closed

Dockerize development environment #142

wants to merge 1 commit into from

Conversation

benjaoming
Copy link
Contributor

  • Install all dependencies runtime
  • Install all dependencies in Docker container
  • Install all dependencies in Docker container, but update runtime
  • Invoke dev server in entrypoint
  • Write good docs

I noticed that the Poetry configuration refuses to install on Python 3.9 so I updated the docs to reflect this.

@agjohnson
Copy link
Contributor

If you are concerned about security locally, this might be a place to just use a one-off server instead of reworking the workflow in this repository. A private container maintains all of the existing workflow, and doesn't add the complexity of another layer on top of local dependencies for everyone.

@ericholscher
Copy link
Member

@benjaoming I tried to get this going, but it wasn't working for me initiall. I don't know if you can actually do 2 FROM statements like that.

I have a slight preference for Ubuntu over Alpine to match the rest of our stack, but would be good to get some standard env setup and working in Docker 👍

@benjaoming
Copy link
Contributor Author

benjaoming commented Aug 19, 2022

@ericholscher After abandoning this work, I got much further with a similar approach over in sphinx_rtd_theme: readthedocs/sphinx_rtd_theme#1319

My approach has been to:

  1. Copy stuff during build such that as many dependencies as possible can be built into the image
  2. Mount in everything via bound mounts, such that the runtime environment can quickly reload when files are edited
  3. Copy out built assets with docker cp (rather than building in the bind mount because of file permissions)
  4. Create a Makefile with convenient shortcuts (also skipped docker-compose)
  5. I did also have success running the same Docker environment in Circle CI, even running it through said make shortcuts for 1:1 consistency. That enables us to both reuse and test the dev setup.

README.rst Show resolved Hide resolved
@benjaoming
Copy link
Contributor Author

We'll be opting for docker-compose.

@ericholscher
Copy link
Member

We'll be opting for docker-compose.

Yea, I think this makes sense. @benjaoming if you have an updated image that would be 💯, so I can test against it.

@ericholscher
Copy link
Member

Think we can close this one for now, since we aren't prioritizing this work yet.

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.

None yet

3 participants