mirror of
https://github.com/spaytac/orbiter.git
synced 2026-01-22 14:24:44 +00:00
Merge pull request #4 from gianarb/feature/docker
Add support to build gianarb/orbiter docker image
This commit is contained in:
commit
f9eb993900
5
Dockerfile
Normal file
5
Dockerfile
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
FROM alpine
|
||||||
|
|
||||||
|
ADD ./bin/orbiter /opt/orbiter
|
||||||
|
|
||||||
|
CMD ["/opt/orbiter", "daemon", "-config", "/etc/orbiter.yml"]
|
||||||
4
Makefile
4
Makefile
@ -8,8 +8,12 @@ binaries:
|
|||||||
@echo "Compiling..."
|
@echo "Compiling..."
|
||||||
@mkdir -p ./bin
|
@mkdir -p ./bin
|
||||||
@go build -i -o ./bin/orbiter
|
@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!"
|
@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
|
vet: ## run go vet
|
||||||
@test -z "$$(go vet ${PACKAGES} 2>&1 | grep -v '*composite literal uses unkeyed fields|exit status 0)' | tee /dev/stderr)"
|
@test -z "$$(go vet ${PACKAGES} 2>&1 | grep -v '*composite literal uses unkeyed fields|exit status 0)' | tee /dev/stderr)"
|
||||||
|
|
||||||
|
|||||||
12
README.md
12
README.md
@ -106,3 +106,15 @@ func CreateAutoScaler() *autoscaler.Autoscaler{
|
|||||||
return a
|
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.
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user