mirror of
https://github.com/scratchfoundation/scratch-docker.git
synced 2025-06-25 10:00:20 -04:00
22 lines
443 B
Bash
Executable file
22 lines
443 B
Bash
Executable file
#!/bin/bash
|
|
|
|
NETWORK_NAME=scratchapi_scratch_network
|
|
|
|
command=$1
|
|
shift
|
|
arg=$1
|
|
shift
|
|
|
|
case "$command" in
|
|
network)
|
|
if [ -z $(docker network ls --filter name=^${NETWORK_NAME}$ --format="{{ .Name }}") ] ; then
|
|
docker network create ${NETWORK_NAME} ;
|
|
fi
|
|
;;
|
|
*)
|
|
echo "usage:"
|
|
echo " docker_config.sh <command> <arg>"
|
|
echo ""
|
|
echo " Currently only performs 'docker_config.sh network create'"
|
|
;;
|
|
esac
|