Let us know how it goes. Depending on how you set the container up you might have to refer to that original github post to copy the build output from the container to your filesystem.
On another note - this linter is annoying! I do not write the way it wants things.. like putting a closing curly brace on the same line as an else..
Great! Yeah I would think they would.. but I donāt know the package managers well enough to fix that at the moment - itās in the dependencies in package.json but for some reason itās getting left out. They have 50 different build targets.. and many of those invoke scripts.. so I imagine it might take some effort to unravel.
Success! Thanks to your instructions this was not very hard to do.
It took me about six hours but thatās only because I run a source based system. It took awhile to update my kernel config and then when I got to the first npm command I found out that my nodejs was built without npm. Node takes an hour and half to compile on my system because Googleās V8 engine is huge. The next build will be much quicker.
I opted to not use VSCode so I had to look up some Docker commands. This was my first foray with Docker so I learned a lot.
System Info:
linux kernel gentoo-6.12.31
docker 28.0.1
nodejs 22.13.1
yarn 1.22.22
Commands:
# building from scratch
mkdir gSender_build && cd gSender_build
printf "FROM node:18-bullseye\n" >> Dockerfile
docker build -t gsender-docker-image .
# run the container and start bash
docker run -it --entrypoint /bin/bash --name gsender-docker-container gsender-docker-image
# subsequent builds can start here using the existing gsender-docker-image
docker run -it --entrypoint /bin/bash gsender-docker-image
# skip on subsequent builds
git clone https://github.com/Sienci-Labs/gsender.git gsender
cd gsender
yarn prepare
yarn install
yarn prebuild-latest
yarn lint
yarn build
# now back in host terminal CWD=gSender_build
docker cp gsender-docker-container:/gsender/dist .
docker cp gsender-docker-container:/gsender/bin .
cd dist/gsender
yarn install
npm install electron
npm install electron-packager
npm install --save @electron/remote
npx electron-packager . my-gSender --platform=linux --arch=x64
Thanks again for your help! Now I just need to learn JS and gSenderās code base
Thatās awesome Michael. Iām sure some folks will be very happy youāve got a Linux build setup working and documented. Itās good that it is so similar.
Letās pretend I have the ability to make a useful contribution to gSender. Who knows, it might even be true!
With that it mind I was thinking about how best to set things up. This is my plan.
Fork Sienciās repo on GitHub
Clone that to my machine and create a branch for my work
The build process then clones my local repo
If my changes are good merge to master, push to my fork, and submit a PR to Sienci
Does that seem like a sensible way to do things? I donāt think I need or want to edit code inside the container. Iāve never contributed to an open source project before but I do have a couple of small open source projects on my GitHub. Iāve even received a couple of PRās but never submitted one.
EDIT:
Thinking a bit more and I guess it doesnāt matter whether the build clones my local repo or my fork if Iām working in a separate branch. Sometimes I over complicate things!