ds [-x] [@<container>] <command> [<arg>...]
DockerScripts is a shell script framework for Docker.
Each container is like a virtual machine that has an application
installed inside. Each container has a base directory where the
settings of the container are stored (in the file
settings.sh). The command ds picks the parameters that it needs
from the file settings.sh in the container's directory.
Normally the commands are issued from inside the container's
directory, however the option @<container> can be used to specify
the context of the command.
The option -x can be used for debugging.
For more details see the man page and the wiki pages:
apt install m4
git clone https://github.com/docker-scripts/ds /opt/docker-scripts/ds
cd /opt/docker-scripts/ds/
make install
ds
ds -h
ds pull wsproxy
ds init wsproxy @wsproxy
source ds cd @wsproxy # (or: cd /var/ds/wsproxy/)
vim settings.sh
ds build
ds create
ds config
ds pull moodle
ds init moodle @moodle1
source ds cd @moodle1 # (or: cd /var/ds/moodle1/)
vim settings.sh
ds build
ds create
ds config
ds wsproxy add
ds wsproxy ssl-cert -t
ds wsproxy ssl-cert
ds pull shellinabox
ds init shellinabox @shell1
source ds cd @shell1
vim settings.sh
ds build
ds create
ds config
ds @wsproxy domains-add shell1-example-org shell1.example.org
ds @wsproxy get-ssl-cert user@example.org shell1.example.org --test
ds @wsproxy get-ssl-cert user@example.org shell1.example.org
-
pull <app> [<branch>]Clone or pull
https://github.com/docker-scripts/<app>to/opt/docker-scripts/<app>. A certain branch can be specified as well. When a branch is given, then it is saved to/opt/docker-scripts/<app>-<branch>. -
init <app> [@<container>]Initialize a container directory by getting the file
settings.shfrom the given app directory. If the second argument is missing, the current directory will be used to initialize the container, otherwise it will be done on/var/ds/<container>. -
infoShow some info about the container of the current directory.
-
build,create,configBuild the image, create the container, and configure the guest system inside the container.
-
inject <script>Inject and run a script inside the container.
-
start,stop,restartStart, stop and restart the container.
-
shellGet a shell on the container.
-
execExecute a command from outside the container.
-
snapshotMake a snapshot of the container.
-
removeRemove the container and the image.
-
runtest [-d|--debug] [<test-script.t.sh>...]Run the given test scripts. If no test-script is given all the test scripts in the working directory will be run. Test scripts have the extension
.t.sh -
test [-d|--debug] [<test-script.t.sh>...]Run the given test scripts inside the ds-test container. It actually call the command
runtestinside the container with the same options and arguments. -
helpDisplay a help message.