Skip to main content

How to - Creating a data image

A data image is the source for future data containers that you will create with Spawn, they contain everything needed for the database engine as well as the databases and optionally, data. Data images can be created as empty or from backup/script files.

Spawn is currently in open beta. Complete the installation instructions to get access.

This is the second in a series of short guides for getting up and running quickly with Spawn.

Data image graphic

Image definition#

Similar to Docker, an image is created based on a definition contained in a file. To get started quickly, we will create a simple image which will allow us to create an empty PostgreSQL container.

  • Create a file development.yaml with your data image specifications.

    sourceType: empty
    name: dev
    engine: postgresql
    version: 11.0

Interested in other engines? Go to our data image page to see how you can use other engines we support.

Create a data image#

To create the data image, we simply run a spawnctl command referencing the file created above.

spawnctl create data-image -f ./development.yaml

Seeing your image#

View all your data images using the following command.

spawnctl get data-images

Using your data image#

Now you have a data image available, you can create data containers.