Skip to content

Commit

Permalink
project: improves readme and adds some helper scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
p1100i committed Nov 20, 2024
1 parent ef70075 commit 14dd192
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 10 deletions.
3 changes: 3 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

docker build --pull --rm -t p1100i/js .
11 changes: 11 additions & 0 deletions debug.sh
Original file line number Diff line number Diff line change
@@ -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
20 changes: 10 additions & 10 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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.

0 comments on commit 14dd192

Please sign in to comment.