X-Git-Url: https://gerrit.akraino.org/r/gitweb?a=blobdiff_plain;f=scripts%2Fcadvisorsetup.sh;fp=scripts%2Fcadvisorsetup.sh;h=1ceae4aee945234fe814db3420358ae582079b51;hb=16e0954d8dd8994a3ac95901e75dcf014c6e747a;hp=0000000000000000000000000000000000000000;hpb=27e9f5fb9f12ba20b1b45e322d2bcfcae5b0da6f;p=eliot.git diff --git a/scripts/cadvisorsetup.sh b/scripts/cadvisorsetup.sh new file mode 100644 index 0000000..1ceae4a --- /dev/null +++ b/scripts/cadvisorsetup.sh @@ -0,0 +1,22 @@ +#!/bin/bash -ex +############################################################################## +# Copyright (c) 2019 Huawei Tech and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## + +HOSTNAME=`hostname` +sudo docker run \ + --volume=/:/rootfs:ro \ + --volume=/var/run:/var/run:ro \ + --volume=/sys:/sys:ro \ + --volume=/var/lib/docker/:/var/lib/docker:ro \ + --volume=/dev/disk/:/dev/disk:ro \ + --publish=8081:8080 \ + --detach=true \ + --name=cadvisor-${HOSTNAME} \ + google/cadvisor:latest +