Merge pull request #17 from vector-im/dbkr/moredocker

Better Docker Support
This commit is contained in:
David Baker 2019-12-13 17:18:16 +00:00 committed by GitHub
commit 5bfd0ed383
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 3 deletions

1
.gitignore vendored
View File

@ -4,4 +4,5 @@
/packages
/deploys
/node_modules
/docker_node_modules
/pkg/control

3
README
View File

@ -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/`.

View File

@ -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": {

View File

@ -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 "$@"