diff options
author | Lennart Weller <lhw@ring0.de> | 2017-07-27 09:55:47 +0000 |
---|---|---|
committer | Lennart Weller <lhw@ring0.de> | 2017-07-27 09:55:47 +0000 |
commit | a133c9c3b637b1dbe7b5b053f7e2572c1950cead (patch) | |
tree | 2207939a88e96bca329457f40a9d9d18ab659dc1 /makeself/build-x86_64-static.sh | |
parent | New upstream version 1.6.0+dfsg (diff) | |
download | netdata-a133c9c3b637b1dbe7b5b053f7e2572c1950cead.tar.xz netdata-a133c9c3b637b1dbe7b5b053f7e2572c1950cead.zip |
New upstream version 1.7.0+dfsgupstream/1.7.0+dfsg
Diffstat (limited to 'makeself/build-x86_64-static.sh')
-rwxr-xr-x | makeself/build-x86_64-static.sh | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/makeself/build-x86_64-static.sh b/makeself/build-x86_64-static.sh new file mode 100755 index 000000000..0516beae2 --- /dev/null +++ b/makeself/build-x86_64-static.sh @@ -0,0 +1,39 @@ +#!/usr/bin/env sh + +set -e + +DOCKER_CONTAINER_NAME="netdata-package-x86_64-static" + +if ! sudo docker inspect "${DOCKER_CONTAINER_NAME}" >/dev/null 2>&1 +then + # To run interactively: + # sudo docker run -it netdata-package-x86_64-static /bin/sh + # (add -v host-dir:guest-dir:rw arguments to mount volumes) + # + # To remove images in order to re-create: + # sudo docker rm -v $(sudo docker ps -a -q -f status=exited) + # sudo docker rmi netdata-package-x86_64-static + # + # This command maps the current directory to + # /usr/src/netdata.git + # inside the container and runs the script setup-x86_64-static.sh + # (also inside the container) + # + sudo docker run -v $(pwd):/usr/src/netdata.git:rw alpine:3.5 \ + /bin/sh /usr/src/netdata.git/makeself/setup-x86_64-static.sh + + # save the changes made permanently + id=$(sudo docker ps -l -q) + sudo docker commit ${id} "${DOCKER_CONTAINER_NAME}" +fi + +# Run the build script inside the container +sudo docker run -a stdin -a stdout -a stderr -i -t -v \ + $(pwd):/usr/src/netdata.git:rw \ + "${DOCKER_CONTAINER_NAME}" \ + /bin/sh /usr/src/netdata.git/makeself/build.sh + +if [ "${USER}" ] + then + sudo chown -R "${USER}" . +fi |