Add support to build gianarb/orbiter docker image

This commit is contained in:
Gianluca Arbezzano 2017-03-12 23:49:51 +00:00
parent 92aa62d363
commit 3d03d09f9b
3 changed files with 21 additions and 0 deletions

5
Dockerfile Normal file
View File

@ -0,0 +1,5 @@
FROM alpine
ADD ./bin/orbiter /opt/orbiter
CMD ["/opt/orbiter", "daemon", "-config", "/etc/orbiter.yml"]

View File

@ -8,8 +8,12 @@ binaries:
@echo "Compiling..."
@mkdir -p ./bin
@go build -i -o ./bin/orbiter
@CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -i -o ./bin/orbiter
@echo "All done! The binaries is in ./bin let's have fun!"
build/docker: binaries
@docker build -t gianarb/orbiter:latest .
vet: ## run go vet
@test -z "$$(go vet ${PACKAGES} 2>&1 | grep -v '*composite literal uses unkeyed fields|exit status 0)' | tee /dev/stderr)"

View File

@ -106,3 +106,15 @@ func CreateAutoScaler() *autoscaler.Autoscaler{
return a
}
```
## With docker
```sh
docker run -it -v ${PWD}/your.yml:/etc/orbiter.yml -p 8000:8000 gianarb/orbiter
```
We are supporting an imag `gianarb/orbiter` in hub.docker.com. You can run it
with your configuration.
In this example I am using volumes but if you have a Docker Swarm 1.13 up and
running you can use secrets.