Skip to content

Commit 6b0212e

Browse files
committed
Added all local docker on mac example script
1 parent efe85f3 commit 6b0212e

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

examples/mac_on_docker_cluster.sh

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/bin/sh
2+
#
3+
# This exampe shows how to run an ArangoDB cluster all locally in docker on mac.
4+
#
5+
# By default this script uses the latest released ArangoDB docker image.
6+
# To use another image, set ARANGOIMAGE to the desired image, before calling this script.
7+
#
8+
9+
NSCONTAINER=arangodb-on-mac-ns
10+
STARTERCONTAINER=arangodb-on-mac
11+
ARANGOIMAGE=${ARANGOIMAGE:=arangodb/arangodb:latest}
12+
13+
# Create network namespace container.
14+
# Make sure to expose all ports you want here.
15+
docker run -d --name=${NSCONTAINER} \
16+
-p 8528:8528 -p 8529:8529 -p 8534:8534 -p 8539:8539 \
17+
alpine:latest sleep 630720000
18+
19+
# Run the starter in a container using the network namespace of ${NSCONTAINER}
20+
docker run -it --name=${STARTERCONTAINER} --rm \
21+
--net=container:${NSCONTAINER} \
22+
-v /var/run/docker.sock:/var/run/docker.sock \
23+
arangodb/arangodb-starter \
24+
--docker.image=${ARANGOIMAGE} \
25+
--starter.address=localhost \
26+
--starter.local
27+
28+
# Remove namespace container
29+
docker rm -vf ${NSCONTAINER}

0 commit comments

Comments
 (0)