Skip to content

Commit

Permalink
Merge pull request #17 from vector-im/dbkr/moredocker
Browse files Browse the repository at this point in the history
Better Docker Support
  • Loading branch information
dbkr authored Dec 13, 2019
2 parents 39c6db4 + 9a3c0f7 commit 5bfd0ed
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@
/packages
/deploys
/node_modules
/docker_node_modules
/pkg/control
3 changes: 2 additions & 1 deletion README
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ This will do a couple of things:

You can also build using docker, which will always produce the linux package:
```
yarn run dockerbuild
yarn run docker:install
yarn run docker:build
```

After running, the packages should be in `dist/`.
Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
"start": "electron .",
"lint": "eslint src/",
"build": "yarn run setversion && electron-builder",
"in-docker": "scripts/in-docker.sh",
"docker:build": "yarn run in-docker yarn run build",
"docker:install": "yarn run in-docker yarn install",
"clean": "rimraf webapp.asar dist packages deploys"
},
"dependencies": {
Expand Down
4 changes: 2 additions & 2 deletions scripts/dockerbuild.sh → scripts/in-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ docker run --rm -ti \
--env ELECTRON_CACHE="/root/.cache/electron" \
--env ELECTRON_BUILDER_CACHE="/root/.cache/electron-builder" \
-v ${PWD}:/project \
-v ${PWD##*/}-node-modules:/project/node_modules \
-v ${PWD}/docker_node_modules:/project/node_modules \
-v ~/.cache/electron:/root/.cache/electron \
-v ~/.cache/electron-builder:/root/.cache/electron-builder \
electronuserland/builder yarn run build
electronuserland/builder "$@"

0 comments on commit 5bfd0ed

Please sign in to comment.