Skip to main content

Add a New Database Container

In this example, we will create a database container via API commands and CLI command.

  • Create a container by CLI commands

    vme data-container-create -name mygolddb01 -image mysql:latest
  • Create a container by API commands

    curl -X POST \
    -H "Content-Type: application/json" \
    -H 'username: xxxxx' \
    -H 'api-key: xxxxx' \
    -d '{ "image": "mysql:latest", "name": "mygolddb01", "volumes": ["/demo-pool/sources/demo-source:/var/lib/mysql"], "environment": ["MYSQL_ROOT_PASSWORD=<my-secret-pw>", "MYSQL_USER=<example-user>", "MYSQL_PASSWORD=<my-cool-pw>"], "ports": 8888}' \
    "https://x.x.x.x/docker/container/create"