-
-
Notifications
You must be signed in to change notification settings - Fork 46
Feat: Add Docker setup, CMake and cross-platform build scripts #139
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
Merged
Merged
Changes from all commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
930275e
fix: improve Windows support for npm scripts
dougwithseismic 2fe9b25
feat: migrate WASM build system from Make to CMake for Windows support
dougwithseismic fc60c4e
fix: improve error handling in build script and remove legacy Makefiles
dougwithseismic b9408f7
fix(setup-and-dependencies.md): better styles
Ryan-Millard 53c9ef5
remove(pnpm file): Not relevant in this PR
Ryan-Millard 785c3ed
update(CMakeLists.txt files): Ensure consistency & clarity
Ryan-Millard 2e5fa81
feat(docker compose): Set up basic docker usage with CLI script
Ryan-Millard c4f1696
feat(img2num CLI): Add bat & ps1 scripts for windows users
Ryan-Millard f84c076
feat(img2num script): Add disclaimer comment for Windows users
Ryan-Millard 26a0832
fix(img2num scripts): Handle args to npm scripts properly
Ryan-Millard 7689a9f
fix(img2num bash script, docs): Forward ports properly & add disclaimer
Ryan-Millard 9776dde
fix(img2num windows scripts): align with bash counterpart, fix commenβ¦
Ryan-Millard 98544a5
fix(img2num bash script): Make executable & add to tracking
Ryan-Millard 1a65ab6
fix(Dockerfile): switch to node:22-bullseye, the latest stable release
Ryan-Millard c83644c
docs(Makefile references): Switch to CMake where appropriate
Ryan-Millard eb8584f
docs(setup & dependencies): Update node version to most accurate for β¦
Ryan-Millard c71f672
fix(img2num scripts): Duplicate clean arg removed
Ryan-Millard b5498e0
fix(imng2num scripts): Provide proper exit codes for success and failβ¦
Ryan-Millard 09695ca
docs(setup & deps): Fix header & code block - use ## instead of #, spβ¦
Ryan-Millard 1248d8d
chore(img2num.bat): remove duplicate comment
Ryan-Millard a051603
chore(build-wasm.js): Add helpful log regarding rm -rf
Ryan-Millard bdda9a0
chore(img2num sh script): Fix wording
Ryan-Millard 2ee0b07
fix(img2num scripts): stop hiding docker errors - allows users to troβ¦
Ryan-Millard caff168
refactor(img2num scripts): add purge arg, better container management
Ryan-Millard 49891ef
feat(.editorconfig): Add bash, batch, powershell support
Ryan-Millard 5ea0721
feat(docker-compose.yml): add remote image ryanmillard/img2num-dev:laβ¦
Ryan-Millard 0b745d8
docs(getting-started): update comprehensive installation and first-ruβ¦
Ryan-Millard 0de2ac7
docs(getting-started): add tip on help args for img2num script
Ryan-Millard 9c30b94
docs(getting-started): add tip on help npm script for local users
Ryan-Millard 002802b
docs(intro page): fix grammatical error
Ryan-Millard 0e9fae5
Merge remote-tracking branch 'origin/main' into feat/docker-docker-coβ¦
Ryan-Millard 80ac27e
docs(README.md): update README.md disclaimer comment for better PR reβ¦
Ryan-Millard 9a24995
docs(fix intro links): remove redundant, use HTTPS for Blank Issue link
Ryan-Millard File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| #!/usr/bin/env bash | ||
| set -euo pipefail | ||
|
|
||
| # Source emsdk environment | ||
| if [ -f "${EMSDK_ROOT}/emsdk_env.sh" ]; then | ||
| source "${EMSDK_ROOT}/emsdk_env.sh" | ||
| fi | ||
|
|
||
| # Go to workdir | ||
| cd /usr/src/app | ||
|
|
||
| exec "$@" |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| node_modules/* | ||
| dist/* | ||
| build/* | ||
| docs/build/* | ||
| .vscode | ||
| .git | ||
| .gitignore | ||
| .DS_Store |
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| # ------------------------ | ||
| # Img2Num Dockerfile.dev | ||
| # ------------------------ | ||
| FROM node:22-bullseye | ||
|
|
||
| ENV EMSDK_VERSION=4.0.10 | ||
| ENV EMSDK_DIR=/opt/emsdk | ||
|
|
||
| RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
| build-essential \ | ||
| cmake \ | ||
| python3 \ | ||
| git \ | ||
| curl \ | ||
| unzip \ | ||
| pkg-config \ | ||
| bash \ | ||
| ca-certificates \ | ||
| libvips-dev \ | ||
| && rm -rf /var/lib/apt/lists/* | ||
|
|
||
| # Install EMSDK once, cached by Docker layers | ||
| RUN git clone --depth 1 https://github.com/emscripten-core/emsdk.git $EMSDK_DIR \ | ||
| && cd $EMSDK_DIR \ | ||
| && git fetch --tags \ | ||
| && git checkout $EMSDK_VERSION \ | ||
| && ./emsdk install $EMSDK_VERSION \ | ||
| && ./emsdk activate $EMSDK_VERSION | ||
|
|
||
| ENV PATH=$EMSDK_DIR:$EMSDK_DIR/upstream/emscripten:$PATH | ||
| ENV EMSDK=$EMSDK_DIR | ||
|
|
||
| RUN npm install -g npm@11 | ||
|
|
||
| WORKDIR /usr/src/app | ||
|
|
||
| ENV CHOKIDAR_USEPOLLING=true | ||
| ENV CHOKIDAR_INTERVAL=100 | ||
|
|
||
| EXPOSE 5173 3000 | ||
|
|
||
| CMD ["bash"] | ||
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| services: | ||
| dev: | ||
| image: ryanmillard/img2num-dev:latest | ||
| build: | ||
| context: . | ||
| dockerfile: Dockerfile.dev | ||
| container_name: img2num-dev | ||
| working_dir: /usr/src/app | ||
| volumes: | ||
| - .:/usr/src/app:cached | ||
| - node_modules:/usr/src/app/node_modules | ||
| - docs_node_modules:/usr/src/app/docs/node_modules | ||
| environment: | ||
| CHOKIDAR_USEPOLLING: "true" | ||
| CHOKIDAR_INTERVAL: "100" | ||
| ports: | ||
| - "5173:5173" # Vite dev | ||
| - "4173:4173" # Vite preview | ||
| - "3000:3000" # Docusaurus dev | ||
| stdin_open: true | ||
| tty: true | ||
|
|
||
| volumes: | ||
| node_modules: | ||
| docs_node_modules: |
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.