Docker

Please note that starting March 19th 2024, we will be migrating from Quay to Docker Hub. Follow the steps below to complete the migration.

For the platform independent usage of the VGS CLI you can use our Dockerarrow-up-right integration. Check our official images on Docker Hubarrow-up-right repository.

Run

In order to run in Docker we recommend declaring the following docker-compose.yaml:

version: '3'
services:
  cli:
    image: verygoodsecurity/cli:\$\{VERSION:-latest\}
    stdin_open: true
    tty: true
    entrypoint: bash
    ports:
      - "127.0.0.1:7745:7745"
      - "127.0.0.1:8390:8390"
      - "127.0.0.1:9056:9056"

Before executing any VGS CLI commands, you need to start the container in detached mode by executing:

docker-compose up -d cli

Run a specific version:

Authentication

There are two options for authentication:

  • Authenticate with your personal VGS account.

  • Authenticate with Service Account.

Authenticate with your personal VGS account

For this option you need to manually execute the login command:

You will see the following output:

Copy the URL and paste it into your browser to authenticate to VGS.

Authenticate with Service Account

Make sure to never store credentials in the version control system.

If you'd like to use this option, you need to create Service Account client first.

Having credentials of the Service Account client, you can declare the following .env file:

And the docker-compose.yaml should look as follows:

Alternatively, you can set the environment variables right in the docker-compose.yaml:

Use

You can now use the CLI in Docker. Try to get your route configuration with the following command:

This command will get your route configurations in YAML format.

Cleanup

When you finished working with the CLI you can run:

Next Steps

Check what else you can do. Use these guides or explore the CLI with docker-compose exec cli vgs --help command.

Last updated