diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..7efb3b2 --- /dev/null +++ b/build.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +docker build --pull --rm -t p1100i/js . diff --git a/debug.sh b/debug.sh new file mode 100755 index 0000000..3ad2a04 --- /dev/null +++ b/debug.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +docker run \ + --tty \ + --interactive \ + --rm \ + --privileged \ + --volume "$(pwd):/builds/project" \ + --env SKIP_NPM_INSTALL="true" \ + --entrypoint /bin/bash \ + p1100i/js diff --git a/readme.md b/readme.md index 7e52d3e..7dc78e9 100644 --- a/readme.md +++ b/readme.md @@ -2,17 +2,13 @@ docker-js ========= > Personal docker image for JS projects. -# Build -``` -docker build -t p1100i/js . -``` - -# Push -``` -docker push p1100i/js -``` +# Development +Have this repo cloned for yourself. +* build it with: `./build.h` +* publish it with: `./publish.sh` (this builds it again to be safe) # Local use +Have a script like `test.sh` in a JS project with the following content: ``` docker run \ --tty \ @@ -30,4 +26,8 @@ Have the `.gitlab-ci.yml` file for your project with the following content: image: name: p1100i/js ``` -Everything should be automated by [entrypoint.sh](entrypoint.sh) handling [variables predefined](https://docs.gitlab.com/ee/ci/variables/predefined_variables.html) by the gitlab runner env. + +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](entrypoint.sh) handling [variables predefined](https://docs.gitlab.com/ee/ci/variables/predefined_variables.html) by the gitlab runner env. +