Merge pull request #2 from pldubouilh/docker

dockerfile
This commit is contained in:
Pierre Dubouilh 2018-11-17 01:08:12 +01:00 committed by GitHub
commit 989449f3c3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 19 additions and 3 deletions

4
Dockerfile Normal file
View file

@ -0,0 +1,4 @@
FROM alpine
EXPOSE 8001
COPY gossa /gossa
ENTRYPOINT [ "/gossa", "-h", "0.0.0.0", "/shared" ]

View file

@ -1,6 +1,6 @@
build:
make embed
go build gossa.go
CGO_ENABLED=0 go build gossa.go
rm gossa.go
embed:
@ -16,8 +16,8 @@ run:
ci:
cd src && go vet && go fmt
timeout 5 make run &
cd src && sleep 1 && go test
timeout 10 make run &
cd src && sleep 5 && go test
ci-watch:
ls src/* | entr -rc make ci

View file

@ -35,3 +35,15 @@ make
### built blobs
built blobs are available on the [release page](https://github.com/pldubouilh/gossa/releases).
### using with docker
a pretty short docker file is provided
```sh
# build docker image
make
docker build -t gossa .
# run
sudo docker run -v ~/ToShare:/shared -p 8001:8001 gossa
```