DockerScripts is a shell script framework for Docker.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
man Rename command runcfg to inject. Sep 30, 2017
sh Fix debian dockerfiles Aug 22, 2018
LICENSE Initial commit. Jul 17, 2017
Makefile Improve Makefile Aug 22, 2018 Small fixes Aug 2, 2018



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 The command ds picks the parameters that it needs from the file 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 /opt/docker-scripts/ds
cd /opt/docker-scripts/ds/
make install
ds -h


Installing Web Server Proxy

ds pull wsproxy
ds init wsproxy @wsproxy
source ds cd @wsproxy   # (or: cd /var/ds/wsproxy/)
ds build
ds create
ds config

Installing Moodle

ds pull moodle
ds init moodle @moodle1

source ds cd @moodle1   # (or: cd /var/ds/moodle1/)
ds build
ds create
ds config

ds wsproxy add
ds wsproxy ssl-cert -t
ds wsproxy ssl-cert

Installing ShellInABox

ds pull shellinabox
ds init shellinabox @shell1

source ds cd @shell1
ds build
ds create
ds config

ds @wsproxy domains-add shell1-example-org
ds @wsproxy get-ssl-cert --test
ds @wsproxy get-ssl-cert


  • pull <app> [<branch>]

    Clone or pull<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 from 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>.

  • info

    Show some info about the container of the current directory.

  • build, create, config

    Build 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, restart

    Start, stop and restart the container.

  • shell

    Get a shell on the container.

  • exec

    Execute a command from outside the container.

  • snapshot

    Make a snapshot of the container.

  • remove

    Remove the container and the image.

  • runtest [-d|--debug] [<>...]

    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

  • test [-d|--debug] [<>...]

    Run the given test scripts inside the ds-test container. It actually call the command runtest inside the container with the same options and arguments.

  • help

    Display a help message.