To delete a Data Container use the
$ spawnctl delete data-container <ContainerID>
In this tutorial we will create a Data Image, then create a Data Container from that image and finally delete the data-container.
As a prerequisite you should've followed the instructions to install spawnctl
Create a file
development.yamlwith your Data Image specifications.
sourceType: empty name: dev engine: postgresql
In this case we want to create a PostgreSQL Data Image that is completely empty and is named
Run the following command to create a Data Image.
$ spawnctl create data-image -f ./development.yaml Waiting for data image creation....... Creating data image........... Data image '10001' created!
You can verify your Data Image by running the following command.
$ spawnctl get data-images NAME IMAGE ID ENGINE STATUS MESSAGE CREATED dev 10001 PostgreSQL 2 Created 2 minutes ago
Create a Data Container from the newly created Data Image.
$ spawnctl create data-container --image 10001 Waiting for data container creation.... Creating data container..... Data container '10001' created! -> Host=instances.spawn.cc;Port=53223;User ID=<some_user_id>;Password=<some_password>;
You can verify your Data Container was properly created by running the following command.
$ spawnctl get data-containers NAME CONTAINER ID REVISION STATUS MESSAGE ENGINE CREATED dev-cp5rye3n 10001 rev.0 2 Running PostgreSQL 1 minute ago
You should now be able to delete your Data Container.
$ spawnctl delete data-container 10001 Deleting container...... 10001