Installation

You can install the Admin Service command line interface (CLI) as a binary, or run it in a container.

Prerequisites

On Linux, make sure that the .mtx/admin-service directory exists in your home directory with a command similar to the following:

mkdir -p ~/.mtx/admin-service

On Windows, make sure that the .mtx/admin-service directory exists in your home directory with a command similar to the following:

mkdir %homedrive%%homepath%\.mtx\admin-service

Running as Platform Independent Binary

On Linux, extract the binary from the Docker image with the following command:

docker run --rm --entrypoint /bin/bash -v $(pwd):/install --user "$(id -u):$(id -g)" docker.cloudsmith.io/matrixx-software/matrixx-cloud/mtxctl -c "cp -v /mtxctl /install/"

On Windows extract the binary from the Docker image with the following command:

docker run --rm --entrypoint /bin/bash -v .:/install docker.cloudsmith.io/matrixx-software/matrixx-cloud/mtxctl -c "cp -v /mtxctl.exe /install/"

Running in a Container

Note: Running the CLI in a container may be noticably slower due to container start-up delays.

On Linux, run the CLI in a container with the following command:

docker run --rm -w /working -v $(pwd):/working -v ${HOME}/.mtx/admin-service:/config -e MTXCTL_HOME_DIR=/config --user "$(id -u):$(id -g)" --network host docker.cloudsmith.io/matrixx-software/matrixx-cloud/mtxctl context list
Tip: On Linux, add an alias to your ~/.bashrc file to be able to use the containerized version directly from the terminal:
alias mtxctl='docker run --rm -w /working -v $(pwd):/working -v ${HOME}/.mtx/admin-service:/config -e MTXCTL_HOME_DIR=/config --user "$(id -u):$(id -g)" --network host docker.cloudsmith.io/matrixx-software/matrixx-cloud/mtxctl $@'

On Windows, run the CLI in a container with the following command:

docker run --rm -w /working -v .:/working -v %homedrive%%homepath%/.mtx/admin-service:/config -e MTXCTL_HOME_DIR=/config --network host docker.cloudsmith.io/matrixx-software/matrixx-cloud/mtxctl context list

Time Zones

Running mtxctl as a Docker container shows all times in UTC by default. To show times in your local time zone, add a TZ environment variable to your docker run command with a value representing your location in TZ database format, typically continent/city.