How to - Creating a data container
A data container is the read/write database engine that you connect to for working with your databases. All data containers are based off a data image, providing you access to any databases and data in the original image, but taking just seconds to create. All data containers that you create are isolated from any others, allowing you or your team members to make changes without worrying about impacting anything else.
Spawn is currently in open beta. Complete the installation instructions to get access.
This is part of a series of short guides for getting up and running quickly with Spawn.
#
Create a data containerSimilar to Docker, a data container is created based on a data image. To create a data container in this example, you should have already created a data image named dev.
To create the data container, we simply run a spawnctl command referencing our data image using the --image
parameter.
#
Connecting to your data containerOnce the data container has been created successfully, the command will return with both the container name (auto generated if not specified) and a connection string. You can use this connection string in an application that needs to connect to the database, or use the values such as Host
,Port
,Username
and Password
to connect to your data container using your usual client tools.
#
Seeing your data containersView all your data containers using the following command.
If you need the connection string again for a data container, add -o wide
.
To return your data containers, including connection details in a format more suitable for parsing programmatically, add -o json
#
Using your data containerNow you are able to create data containers, you can perform advanced actions such as save, graduate, reset and load.