-
Notifications
You must be signed in to change notification settings - Fork 0
Home
This is the first command you need to run to use the other commands. To login, run
$ mocli login --client-id=foo --client-secret=bar
This will create a file credentials under {home}/.mocli/ folder that will contain the API token to be used for your subsequent commands.
Examples:
$ mocli stack list
$ mocli stack list --fmt=text
$ mocli stack list --fmt=json
$ mocli stack list --fmt=raw --out=`echo $HOME`/out.txt
Enclose with double quotes if absolute file path has whitespace(s) in it.
Examples:
$ mocli stack describe --id=foo
$ mocli stack describe --id=foo --fmt=raw --out=/home/bar/out.txt
You can get the stack id from the stack list command.
Example:
$ mocli stack delete --id=foo
Example:
$ mocli svrconf show --id=foo
You can get the stack id from the stack list command.
Examples:
$ mocli svrconf update --id=foo --env=KEY1:value1,KEY2:value2,KEYx:valuex
If you have whitespaces in the input, enclose it with double quotes
$ mocli svrconf update --id=foo --env="KEY1: value1, KEY2: value2, KEYx: valuex"
To clear all environment variables, set --env=null option
$ mocli svrconf update --id=foo --env=null
To update server config filepath, run
$ mocli svrconf update --id=foo --filepath=git://github.com/mobingilabs/default
Note that when you provide update options simultaneously (for example, you provide --env=FOO:bar and --filepath=test at the same time), the tool will send each option as a separate request.
Examples:
$ mocli creds list
$ mocli creds list --fmt=json
$ mocli creds list --fmt=raw
To get token for Docker Registry API access, run
$ mocli registry token \
--username=foo \
--password=bar \
--service="Mobingi Docker Registry" \
--scope="repository:foo/container:*"
where username is a subuser under your Mobingi account. You can also remove --service, --username and/or --password.
$ mocli registry token --scope="repository:foo/container:*"
Username:
Password:
By default, it will only print the token value. To print the raw JSON output, append the --fmt=raw option.
This is useful when you want to access the registry directly using other tools. For example, you can use the token when using Docker Registry API via curl.
$ curl -H "Authorization: Bearer token" \
-H "Accept application/vnd.docker.distribution.manifest.v2+json" \
https://registry.mobingi.com/v2/foo/container/manifests/latest
To list image tags, run
$ mocli registry tags [--username=foo] [--password=bar] --image=image_name
To print the catalog, run
$ mocli registry catalog [--username=foo] [--password=bar]
Note that this command is inherently slow.
To print a tag manifest, run
$ mocli registry manifest [--username=foo] [--password=bar] --image=hello:latest
You can also write the output to a file via the --fmt=full_path_to_file option.
To delete a tag, run
$ mocli registry delete [--username=foo] [--password=bar] --image=hello:latest
You can use the global --verbose option if you want to see more information during the command execution.
Copyright © Mobingi Corporation. 2017. All Rights Reserved.