Add Dockerfile (#14)

This commit is contained in:
Maxim Baz
2018-04-17 00:39:08 +02:00
committed by GitHub
parent 8db942e669
commit c125eca2cd
2 changed files with 52 additions and 0 deletions

11
Dockerfile Normal file
View File

@@ -0,0 +1,11 @@
FROM golang:latest
ENV APP_PATH="$GOPATH/src/github.com/browserpass/browserpass-native"
RUN go get -u github.com/golang/dep/cmd/dep && \
mkdir -p $APP_PATH && \
ln -s $APP_PATH /
WORKDIR $APP_PATH
ENTRYPOINT ["make"]

41
README.md Normal file
View File

@@ -0,0 +1,41 @@
# Browserpass - native host
## Build locally
Make sure you have Golang and [dep](https://github.com/golang/dep) installed.
The following `make` goals are available:
| Command | Description |
| ---------------------------- | ------------------------------------------------------------ |
| `make` or `make all` | Fetch the latest dependencies, compile the app and run tests |
| `make deps` | Fetch the latest dependencies |
| `make browserpass` | Compile the app for your OS |
| `make browserpass-linux64` | Compile the app for Linux 64-bit |
| `make browserpass-windows64` | Compile the app for Windows 64-bit |
| `make browserpass-darwin64` | Compile the app for Mac OS X 64-bit |
| `make browserpass-openbsd64` | Compile the app for OpenBSD 64-bit |
| `make browserpass-freebsd64` | Compile the app for FreeBSD 64-bit |
| `make test` | Run tests |
## Build using Docker
First build the docker image using the following command in the project root:
```shell
docker build -t browserpass .
```
The entry point in the docker image is the `make` command. To run it:
```shell
docker run --rm -v "$(pwd)":/browserpass-native browserpass
```
Specify `make` goal(s) as the last parameter, for example:
```shell
docker run --rm -v "$(pwd)":/browserpass-native browserpass test
```
Refer to the list of available `make` goals above.