feat: add Docker support with multi-stage build #32
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.
Overview
This PR adds Docker support to make it easy for anyone to build and run JSIR without dealing with complex local setup. It addresses issue #29
What's Included
Dockerfile
The Dockerfile uses a two-stage build approach to keep the final image size reasonable. The builder stage image is around 4.7GB and the final image is 190MB and takes about 7-8 minutes to build.
.dockerignore
Added to optimize the build context by excluding unnecessary files, which keeps the image lean and speeds up builds.
README.md Updates
Added a Docker quick start section as the recommended way to get started, with example commands for building and running.
Quick Start
Build the image
Run jsir_gen
Analyze a JavaScript file
Testing
I've verified that:
jsir_gen --helpworks correctlyNotes
The compiler warnings you'll see during build are expected (they're about C++20 extensions in C++17 mode) and don't indicate any problems. No source code modifications were needed.