1
0
mirror of https://github.com/peterbourgon/runsvinit.git synced 2024-12-16 14:57:04 +00:00

Update example

This commit is contained in:
Peter Bourgon 2015-09-25 15:31:54 +02:00
parent 9e1f282bcc
commit 9388d1daa1
4 changed files with 29 additions and 2 deletions

1
.gitignore vendored
View File

@ -1,5 +1,6 @@
runsvinit runsvinit
runsvinit-*-* runsvinit-*-*
examples/runsvinit-linux-amd64*
# Compiled Object files, Static and Dynamic libs (Shared Objects) # Compiled Object files, Static and Dynamic libs (Shared Objects)
*.o *.o

View File

@ -11,6 +11,5 @@ ADD bar /
RUN mkdir -p /etc/service/bar RUN mkdir -p /etc/service/bar
ADD run-bar /etc/service/bar/run ADD run-bar /etc/service/bar/run
ADD https://github.com/peterbourgon/runsvinit/releases/download/v1.0.0/runsvinit-linux-amd64.tgz / ADD /runsvinit /
RUN tar zxf /runsvinit-linux-amd64.tgz && mv /runsvinit-linux-amd64 /runsvinit
ENTRYPOINT ["/runsvinit"] ENTRYPOINT ["/runsvinit"]

13
example/Makefile Normal file
View File

@ -0,0 +1,13 @@
.PHONY: docker
docker: runsvinit
docker build -t runsvinit-example .
runsvinit: runsvinit-linux-amd64
mv $< $@
runsvinit-linux-amd64: runsvinit-linux-amd64.tgz
tar zxf $<
runsvinit-linux-amd64.tgz:
wget --quiet https://github.com/peterbourgon/runsvinit/releases/download/v1.0.0/runsvinit-linux-amd64.tgz

14
example/README.md Normal file
View File

@ -0,0 +1,14 @@
# runsvinit example
## Build the Docker container
`make`
## Run the Docker container
`docker run --name example runsvinit-example:latest`
## Test it works
CTRL-C, or `docker stop example`.