Add Docker support (Dockerfile + docker-compose.yml)#513
Open
DVWang2001 wants to merge 1 commit into
Open
Conversation
Closes cs01#474 — adds a baseline Docker environment as requested. Changes: - Multi-stage Dockerfile: Node 20 builds the React/Webpack frontend, Python 3.13-slim runs the gdbgui server. Keeps the final image small. - libstdc++ pretty-printers wired up via .gdbinit so STL containers display correctly in GDB (fixes sys.path for python:3.13-slim layout). - `set breakpoint pending on` in .gdbinit so pending breakpoints resolve after the binary loads inside the container. - docker-compose.yml grants SYS_PTRACE (required by GDB) and uses seccomp:unconfined for full ptrace compatibility. - .dockerignore excludes node_modules and build artifacts. Note: Webpack 4 + Node 17+ conflict — NODE_OPTIONS rejects --openssl-legacy-provider. Worked around by invoking webpack directly through `node --openssl-legacy-provider`. Upgrading to Webpack 5 would be a cleaner long-term fix. Quick start: docker-compose up --build open http://localhost:5000 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #474 — adds a baseline Docker environment as requested.
.gdbinitso STL containers display correctly in GDB (fixessys.pathfor thepython:3.13-slimlayout).set breakpoint pending onin.gdbinitso pending breakpoints resolve after the binary loads.SYS_PTRACE(required by GDB) and usesseccomp:unconfinedfor full ptrace compatibility.node_modulesand build artifacts.Quick start
docker-compose up --build # open http://localhost:5000Notes
Webpack 4 + Node 17+ incompatibility:
cross-env NODE_OPTIONS=--openssl-legacy-provideris rejected by Node 17+. Worked around by invoking webpack directly throughnode --openssl-legacy-provider ...in the Dockerfile. Upgrading to Webpack 5 would be a cleaner long-term fix but is out of scope for this PR.Test plan
docker-compose up --buildsucceedshttp://localhost:5000loads the gdbgui UIstd::vector<int>shows{1, 2, 3}instead of a raw pointer)