Running Commands Locally
This topic describes how to execute commands locally with Docker.
If you wish to use the underlying om
and p-automator
CLI tools from your local workstation,
we recommend using docker to execute commands.
With p-automator
in particular, using Docker is necessary,
as the IaaS CLIs upon which we depend can be tricky to install.
With om
it's more a matter of convenience -
you can just as easily download the binary if it's available for your system.
Executing Commands
To execute commands in Docker:
- First import the image:
1 |
|
Where ${PLATFORM_AUTOMATION_IMAGE_TGZ}
is the image file downloaded from Pivnet.
- Then, you can use
docker run
to pass it arbitrary commands. Here, we're running thep-automator
CLI to see what commands are available:
1 2 |
|
Note: that this will have access read and write files in your current working directory.
If you need to mount other directories as well, you can add additional -v
arguments.
Useful Commands
It can be very useful to pull configuration for the director and tiles locally using Docker.
- To get the staged config for a product:
1 2 |
|
${ENV_FILE}
is the [generating-env-file] required for all tasks.
${PRODUCT_SLUG}
is the name of the product downloaded from [pivnet].
The resulting file can then be parameterized, saved, and committed to a config repo.
- To get the director configuration:
1 2 |
|