Separate build path for static version

This commit is contained in:
Alex 2020-01-26 22:30:05 +01:00
parent 89e432b06c
commit 1be8b6a3d8
4 changed files with 9 additions and 4 deletions

1
.gitignore vendored
View file

@ -1,2 +1,3 @@
gobottin gobottin
gobottin.static
config.json config.json

View file

@ -1,5 +1,5 @@
FROM scratch FROM scratch
ADD gobottin / ADD gobottin.static /gobottin
ENTRYPOINT ["/gobottin"] ENTRYPOINT ["/gobottin"]

View file

@ -2,9 +2,13 @@ all: gobottin
gobottin: main.go ssha.go util.go acl.go read.go write.go gobottin: main.go ssha.go util.go acl.go read.go write.go
go get -d -v go get -d -v
CGO_ENABLED=0 GOOS=linux go build -a -v go build -v
docker: all gobottin.static: main.go ssha.go util.go acl.go read.go write.go
go get -d -v
CGO_ENABLED=0 GOOS=linux go build -a -v -o gobottin.static
docker: gobottin.static
docker build -t lxpz/gobottin_amd64:$(TAG) . docker build -t lxpz/gobottin_amd64:$(TAG) .
docker push lxpz/gobottin_amd64:$(TAG) docker push lxpz/gobottin_amd64:$(TAG)
docker tag lxpz/gobottin_amd64:$(TAG) lxpz/gobottin_amd64:latest docker tag lxpz/gobottin_amd64:$(TAG) lxpz/gobottin_amd64:latest

View file

@ -12,7 +12,7 @@ job "directory" {
task "server" { task "server" {
driver = "docker" driver = "docker"
config { config {
image = "lxpz/gobottin_amd64:2" image = "lxpz/gobottin_amd64:3"
readonly_rootfs = true readonly_rootfs = true
port_map { port_map {
ldap_port = 1389 ldap_port = 1389