Skip to content

Commit

Permalink
add script for pulling and running a recent docker image, and make us…
Browse files Browse the repository at this point in the history
…er to use right user ID for openwifi user
  • Loading branch information
hpfmn committed Jun 6, 2017
1 parent 270210f commit ebb3836
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Docker/DockerInstall/run_openwifi.sh
@@ -1,5 +1,9 @@
#!/bin/bash

if [ -n "$OPENWIFI_UID" ]; then
usermod -u $OPENWIFI_UID openwifi
fi

if [ ! -e /OpenWifi/setup.py ] && [ ! -e /home/openwifi/OpenWifi ]; then
/DockerInstall/install_openwifi.sh
return false
Expand Down
13 changes: 13 additions & 0 deletions Docker/pull_image_and_run.sh
@@ -0,0 +1,13 @@
#!/bin/bash

source var.sh
echo \
"This pulls (downloads) a recent image and runs (provisions) a container based on an image, you can stop it later via
$DOCKER_CMD stop OpenWifiPull
and start it again via
$DOCKER_CMD start OpenWifiPull"

THIS_USER_ID=$(id -ur)

$DOCKER_CMD pull openwifi/openwificore
exec $DOCKER_CMD run -P -p 6543:6543 -v $(dirname $PWD):/OpenWifi --name OpenWifiPull -e=OPENWIFI_UID=$THIS_USER_ID openwifi/openwificore

0 comments on commit ebb3836

Please sign in to comment.