Add support for OpenRC services (alpine/busybox) (#252)

This commit is contained in:
Karen Almog
2020-12-11 15:35:37 +01:00
committed by GitHub
parent 18c957a3dc
commit ef35c56320
5 changed files with 251 additions and 2 deletions
+12 -2
View File
@@ -1,8 +1,9 @@
all: sysv systemd upstart clean
all: sysv systemd upstart openrc clean
# compile `go test` binary statically
test:
@go test -c ..
@CGO_ENABLED=0 go test -installsuffix netgo -a -c ..
clean:
-rm service.test
@@ -33,3 +34,12 @@ upstart: test
@-docker rm $(shell docker ps -l -q)
@-docker rmi -f service.test.upstart
@-rm upstart/service.test
openrc: test
@echo openrc
@cp service.test openrc/
@docker build -q --tag="service.test.openrc" openrc
@-docker run service.test.openrc
@-docker rm $(shell docker ps -l -q)
@-docker rmi -f service.test.openrc
@-rm openrc/service.test
+3
View File
@@ -0,0 +1,3 @@
FROM alpine:latest
ADD service.test /tmp/
CMD /tmp/service.test -test.v=true