From 01cdadf7122cddfa8492db86f81b3232b7f82577 Mon Sep 17 00:00:00 2001 From: Lionel Sambuc Date: Mon, 12 Mar 2018 10:55:23 +0100 Subject: [PATCH] Reduce difference in portainer.sh This script is used both in this repository, as well as in the mip-federation repository, so keep them as close as possible. --- portainer.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/portainer.sh b/portainer.sh index e9374ee..b89ced1 100755 --- a/portainer.sh +++ b/portainer.sh @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright (c) 2018-2018 +# Copyright (c) 2017-2018 # Data Intensive Applications and Systems Labaratory (DIAS) # Ecole Polytechnique Federale de Lausanne # @@ -25,9 +25,10 @@ test -d ${PORTAINER_DATA} \ || mkdir -p ${PORTAINER_DATA} \ || ( echo Failed to create ${PORTAINER_DATA}; exit 1 ) -sudo docker run -d -p ${PORTAINER_PORT}:9000 \ +docker run -d \ + --publish ${PORTAINER_PORT}:9000 \ --restart unless-stopped \ - -v /var/run/docker.sock:/var/run/docker.sock:rw \ - -v ${PORTAINER_DATA}:/data:rw \ + --mount type=bind,src=/var/run/docker.sock,dst=/var/run/docker.sock \ + --mount type=bind,src=${PORTAINER_DATA},dst=/data \ --name ${COMPOSE_PROJECT_NAME}_${PORTAINER_HOST} \ ${PORTAINER_IMAGE}${PORTAINER_VERSION}