This repository was archived by the owner on May 27, 2019. It is now read-only.
File tree 3 files changed +39
-1
lines changed
3 files changed +39
-1
lines changed Original file line number Diff line number Diff line change @@ -14,3 +14,4 @@ chrome/inject.js
14
14
node_modules
15
15
.vagrant /
16
16
vendor /
17
+ . * .swp
Original file line number Diff line number Diff line change 1
1
# CONTRIBUTING
2
2
3
- You will need Node, [ Yarn] ( https://yarnpkg.com/ ) , Golang and [ dep] ( https://github.com/golang/dep ) installed.
3
+ You will need Docker or Node, [ Yarn] ( https://yarnpkg.com/ ) , Golang and [ dep] ( https://github.com/golang/dep ) installed.
4
4
5
5
## To build
6
6
- Run ` make ` to compile both front-end and back-end code
@@ -24,6 +24,28 @@ The commands above will generate unpacked extensions for both Firefox and Chrome
24
24
- Click ` Load temporary add-on `
25
25
- Select ` browserpass/firefox ` directory
26
26
27
+ ## Build using Docker
28
+
29
+ The [ Dockerfile] ( Dockerfile ) will set up a docker image suitable for running basic make targets such as building frontend and backend.
30
+
31
+ The ` crx ` target is not supported by now (therefore ` release ` target will not work).
32
+
33
+ To build the docker image run the following command in project root:
34
+ ``` shell
35
+ docker build -t browserpass-dev .
36
+ ```
37
+
38
+ To build browserpass (frontend and backend) via docker, run the following from project root:
39
+ ``` shell
40
+ docker run --rm -v " $( pwd) " :/browserpass browserpass-dev
41
+ ```
42
+
43
+ If you only want to build front-end or backend, run one of the following:
44
+ ``` shell
45
+ docker run --rm -v " $( pwd) " :/browserpass browserpass-dev js
46
+ docker run --rm -v " $( pwd) " :/browserpass browserpass-dev browserpass
47
+ ```
48
+
27
49
## Setting up a Vagrant build environment and building the Linux binary
28
50
29
51
Vagrant will set up a virtual machine with all dependencies installed for you. Your local working directory is shared into the VM.
Original file line number Diff line number Diff line change
1
+ FROM golang:1.8-alpine3.6
2
+
3
+ ENV CGO_ENABLED=0 \
4
+ APP_PATH="$GOPATH/src/github.com/dannyvankooten/browserpass"
5
+ # New ENV statement as this depends on APP_PATH
6
+ ENV PATH="$PATH:$APP_PATH/node_modules/.bin/"
7
+
8
+ RUN apk add --no-cache bash git make tar yarn zip && \
9
+ go get -u github.com/golang/dep/cmd/dep && \
10
+ mkdir -p $APP_PATH && \
11
+ ln -s $APP_PATH /
12
+
13
+ WORKDIR $APP_PATH
14
+
15
+ ENTRYPOINT ["make" ]
You can’t perform that action at this time.
0 commit comments