aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2020-01-26 22:30:05 +0100
committerAlex Auvolat <alex@adnab.me>2020-01-26 22:30:05 +0100
commit1be8b6a3d8833a65e051c7936cab662d37bfebc2 (patch)
tree85f9bcbce9f37ef6a2293218fc4c2adc76b283f7
parent89e432b06cbcf8c7bc0433eedfac05171fdfeaa2 (diff)
downloadbottin-1be8b6a3d8833a65e051c7936cab662d37bfebc2.tar.gz
bottin-1be8b6a3d8833a65e051c7936cab662d37bfebc2.zip
Separate build path for static version
-rw-r--r--.gitignore1
-rw-r--r--Dockerfile2
-rw-r--r--Makefile8
-rw-r--r--gobottin.hcl.example2
4 files changed, 9 insertions, 4 deletions
diff --git a/.gitignore b/.gitignore
index b4ba0a1..9fd0402 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
gobottin
+gobottin.static
config.json
diff --git a/Dockerfile b/Dockerfile
index f662db6..afc0b36 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,5 +1,5 @@
FROM scratch
-ADD gobottin /
+ADD gobottin.static /gobottin
ENTRYPOINT ["/gobottin"]
diff --git a/Makefile b/Makefile
index 169e40b..0860814 100644
--- a/Makefile
+++ b/Makefile
@@ -2,9 +2,13 @@ all: gobottin
gobottin: 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
+ 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 push lxpz/gobottin_amd64:$(TAG)
docker tag lxpz/gobottin_amd64:$(TAG) lxpz/gobottin_amd64:latest
diff --git a/gobottin.hcl.example b/gobottin.hcl.example
index bace927..b522245 100644
--- a/gobottin.hcl.example
+++ b/gobottin.hcl.example
@@ -12,7 +12,7 @@ job "directory" {
task "server" {
driver = "docker"
config {
- image = "lxpz/gobottin_amd64:2"
+ image = "lxpz/gobottin_amd64:3"
readonly_rootfs = true
port_map {
ldap_port = 1389