Stakkr Commands¶
stakkr¶
Main CLI Tool that easily create / maintain a stack of services, for example for web development.
Read the configuration file and setup the required services by linking and managing everything for you.
stakkr [OPTIONS] COMMAND [ARGS]...
Options
-
--version
¶
Show the version and exit.
-
-c
,
--config
<config>
¶ Change the configuration file
-
-d
,
--debug
,
--no-debug
¶
-
-v
,
--verbose
¶
console¶
Enter a container to perform direct actions such as install packages, run commands, etc.
stakkr console [OPTIONS] CONTAINER
Options
-
-u
,
--user
<user>
¶ User’s name. Valid choices : www-data or root
-
-t
,
--tty
,
--no-tty
¶
Use a TTY
Arguments
-
CONTAINER
¶
Required argument
dns¶
Start or Stop the DNS forwarder. Useful to access your containers directly by their names. Does not work under Windows as we can’t mount /etc/resolv.conf.
Valid values for ACTION : ‘start’ or ‘stop’
stakkr dns [OPTIONS] ACTION
Arguments
-
ACTION
¶
Required argument
exec¶
Execute a command into a container.
Examples:
stakkr -v exec mysql mysqldump -p'$MYSQL_ROOT_PASSWORD' mydb > /tmp/backup.sql
stakkr exec php php -v
: Execute the php binary in the php container with option -vstakkr exec apache service apache2 restart
stakkr exec [OPTIONS] CONTAINER COMMAND...
Options
-
-u
,
--user
<user>
¶ User’s name. Be careful, each container have its own users.
-
-t
,
--tty
,
--no-tty
¶
Use a TTY
Arguments
-
CONTAINER
¶
Required argument
-
COMMAND
¶
Required argument(s)
mysql¶
stakkr mysql is a wrapper for the mysql binary located in the mysql service.
You can run any mysql command as root, such as :
stakkr mysql -e "CREATE DATABASE mydb"
to create a DB from outsidestakkr mysql
to enter the mysql consolecat myfile.sql | stakkr mysql --no-tty mydb
to import a file from outside to mysql
For scripts, you must use the relative path.
stakkr mysql [OPTIONS] [COMMAND]...
Options
-
-t
,
--tty
,
--no-tty
¶
Use a TTY
Arguments
-
COMMAND
¶
Optional argument(s)
refresh-plugins¶
Required to be launched if you install a new plugin
stakkr refresh-plugins [OPTIONS]
restart¶
Restart all containers
stakkr restart [OPTIONS]
Options
-
-p
,
--pull
¶
Force a pull of the latest images versions
-
-r
,
--recreate
¶
Recreate all containers