diff options
author | Paweł Krupa <pawel@krupa.net.pl> | 2019-01-02 10:12:24 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-02 10:12:24 +0100 |
commit | 4d77f2b32518601d54528bf98e311685cf8478d0 (patch) | |
tree | c3413e8f6a540c74d66acbcb9480c1036f057c12 /packaging/makeself/build-x86_64-static.sh | |
parent | 5b32e18e15421165453745fe091dc8287814f048 (diff) |
move makeself (#4688)
Diffstat (limited to 'packaging/makeself/build-x86_64-static.sh')
-rwxr-xr-x | packaging/makeself/build-x86_64-static.sh | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/packaging/makeself/build-x86_64-static.sh b/packaging/makeself/build-x86_64-static.sh new file mode 100755 index 0000000000..69ddf2bf54 --- /dev/null +++ b/packaging/makeself/build-x86_64-static.sh @@ -0,0 +1,42 @@ +#!/usr/bin/env bash +# SPDX-License-Identifier: GPL-3.0-or-later + +. $(dirname "$0")/../installer/functions.sh || exit 1 + +set -e + +DOCKER_CONTAINER_NAME="netdata-package-x86_64-static-alpine37" + +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 install-alpine-packages.sh + # (also inside the container) + # + run sudo docker run -v $(pwd):/usr/src/netdata.git:rw alpine:3.7 \ + /bin/sh /usr/src/netdata.git/packaging/makeself/install-alpine-packages.sh + + # save the changes made permanently + id=$(sudo docker ps -l -q) + run sudo docker commit ${id} "${DOCKER_CONTAINER_NAME}" +fi + +# Run the build script inside the container +run 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/packaging/makeself/build.sh "${@}" + +if [ "${USER}" ] + then + sudo chown -R "${USER}" . +fi |