Personal docker image for JS projects.
Have this repo cloned for yourself.
- build it with:
./build.h
- publish it with:
./publish.sh
(this builds it again to be safe)
Have a script like test.sh
in a JS project with the following content:
docker run \
--tty \
--interactive \
--rm \
--privileged \
--volume "$(pwd):/builds/project" \
--env SKIP_NPM_INSTALL="true" \
p1100i/js
Have the .gitlab-ci.yml
file for your project with the following content:
image:
name: p1100i/js
After this, gitlab will pull the published image from dockerhub, with the default entrypoint that contains npm install
and npm test
commands.
Generally everything should be automated by entrypoint.sh handling variables predefined by the gitlab runner env.