Skip to content

Instantly share code, notes, and snippets.

@kunthar
Created March 13, 2014 17:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kunthar/9533409 to your computer and use it in GitHub Desktop.
Save kunthar/9533409 to your computer and use it in GitHub Desktop.
Docker assign ip address to container
docker run \
-n=false \
-v /data/p01/percona:/data/p01/percona \
-e "MYSQL_DATA_DIR=/data/p01/percona" \
-e "NODE_IP_ADDRESS=172.17.42.20" \
-h="p01.egnity.com" \
-lxc-conf="lxc.network.type = veth" \
-lxc-conf="lxc.network.ipv4 = 172.17.42.20/24" \
-lxc-conf="lxc.network.ipv4.gateway = 172.17.42.1" \
-lxc-conf="lxc.network.link = docker0" \
-lxc-conf="lxc.network.name = eth0" \
-lxc-conf="lxc.network.flags = up" \
-expose 80 \
-p 80:80 \
-p 3306:3306 \
-p 4444:4444 \
-p 4567:4567 \
-p 4568:4568 \
-i -t kunthar/galera /bin/bash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment