Skip to content

Docker

The local Docker host for Sanoma: a container that runs the company, through the OpenTofu provider.

Package @sanoma-ai/connector-docker, version 0.11.24. Its README, with how to install and connect it, is on GitHub.

Resource types, which a data file under resources/ declares: docker.container.

container

import

docker.container.importreadsafe to retry

Find a container by its name or its binding id and read it; gone when there is none

Input

  • idstringrequired

    at least 1 character

Output

  • idstringrequired

    at least 1 character

  • gonebooleanrequired
  • stateobject
    Fields
    • idstring | null

      The container's id, which Docker sets

    • namestringrequired

      The container's name, such as sanoma-acme

      at least 1 character

    • imagestringrequired

      The Sanoma runtime image, pinned to a tag or a digest, never latest

      matches ^[^\s@]+(:[\w][\w.-]{0,127}|@sha256:[0-9a-f]{64})$

    • sourcestringrequired

      The company repository's clone URL, or a declared GitHub repository

      at least 1 character

    • refstringrequired

      The branch it runs, such as main, never a commit

      at least 1 character

    • revisionstring | null

      The commit it runs, which apply sets from ref

    • secretsrecord of string | null

      Environment variables holding secrets, each a secret(...): SANOMA_DATABASE_URL, SANOMA_SECRETS_KEY

    • portintegerrequired

      The port on 127.0.0.1 the app answers on

      at least 1, at most 65535

    • domainsrecord of string | null

      A public site's domain, by site name

      each value: matches ^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)+$

    • runningboolean | null

      Whether the container runs, which Docker says

  • handlestring

    The driver's data for the object, opaque: pass it back unchanged

read

docker.container.readreadsafe to retry

Read a container as it is now; gone when it no longer exists

Input

  • idstringrequired

    at least 1 character

  • staterecord of any
  • handlestring

    The driver's data for the object, opaque: pass it back unchanged

Output

  • idstringrequired

    at least 1 character

  • gonebooleanrequired
  • stateobject
    Fields
    • idstring | null

      The container's id, which Docker sets

    • namestringrequired

      The container's name, such as sanoma-acme

      at least 1 character

    • imagestringrequired

      The Sanoma runtime image, pinned to a tag or a digest, never latest

      matches ^[^\s@]+(:[\w][\w.-]{0,127}|@sha256:[0-9a-f]{64})$

    • sourcestringrequired

      The company repository's clone URL, or a declared GitHub repository

      at least 1 character

    • refstringrequired

      The branch it runs, such as main, never a commit

      at least 1 character

    • revisionstring | null

      The commit it runs, which apply sets from ref

    • secretsrecord of string | null

      Environment variables holding secrets, each a secret(...): SANOMA_DATABASE_URL, SANOMA_SECRETS_KEY

    • portintegerrequired

      The port on 127.0.0.1 the app answers on

      at least 1, at most 65535

    • domainsrecord of string | null

      A public site's domain, by site name

      each value: matches ^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)+$

    • runningboolean | null

      Whether the container runs, which Docker says

  • handlestring

    The driver's data for the object, opaque: pass it back unchanged

plan

docker.container.planreadsafe to retry

Plan how apply would make a container match its declaration (or delete it, given none); nothing changes

Input

  • idstring

    at least 1 character

  • staterecord of any
  • handlestring

    The driver's data for the object, opaque: pass it back unchanged

  • desiredrecord of any

    The declared fields; a write-only one may hold a secret marker

Output

  • action"none" | "create" | "update" | "replace" | "delete"required
  • plannedrecord of any
  • unknownstring[]required
  • replacestring[]required

    The fields whose change replaces the object: not empty exactly when replace

create

docker.container.createwrite

Create a container as declared

Input

  • desiredrecord of anyrequired

    The declared fields; a write-only one may hold a secret marker

Output

  • idstringrequired

    at least 1 character

  • stateobjectrequired
    Fields
    • idstring | null

      The container's id, which Docker sets

    • namestringrequired

      The container's name, such as sanoma-acme

      at least 1 character

    • imagestringrequired

      The Sanoma runtime image, pinned to a tag or a digest, never latest

      matches ^[^\s@]+(:[\w][\w.-]{0,127}|@sha256:[0-9a-f]{64})$

    • sourcestringrequired

      The company repository's clone URL, or a declared GitHub repository

      at least 1 character

    • refstringrequired

      The branch it runs, such as main, never a commit

      at least 1 character

    • revisionstring | null

      The commit it runs, which apply sets from ref

    • secretsrecord of string | null

      Environment variables holding secrets, each a secret(...): SANOMA_DATABASE_URL, SANOMA_SECRETS_KEY

    • portintegerrequired

      The port on 127.0.0.1 the app answers on

      at least 1, at most 65535

    • domainsrecord of string | null

      A public site's domain, by site name

      each value: matches ^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)+$

    • runningboolean | null

      Whether the container runs, which Docker says

  • handlestring

    The driver's data for the object, opaque: pass it back unchanged

update

docker.container.updatewrite

Change a container to match its declaration, replacing it where a field cannot change in place

Input

  • idstringrequired

    at least 1 character

  • staterecord of any
  • handlestring

    The driver's data for the object, opaque: pass it back unchanged

  • desiredrecord of anyrequired

    The declared fields; a write-only one may hold a secret marker

  • expectobject
    Fields
    • action"none" | "create" | "update" | "replace" | "delete"required
    • replacestring[]required

Output

  • idstringrequired

    at least 1 character

  • stateobjectrequired
    Fields
    • idstring | null

      The container's id, which Docker sets

    • namestringrequired

      The container's name, such as sanoma-acme

      at least 1 character

    • imagestringrequired

      The Sanoma runtime image, pinned to a tag or a digest, never latest

      matches ^[^\s@]+(:[\w][\w.-]{0,127}|@sha256:[0-9a-f]{64})$

    • sourcestringrequired

      The company repository's clone URL, or a declared GitHub repository

      at least 1 character

    • refstringrequired

      The branch it runs, such as main, never a commit

      at least 1 character

    • revisionstring | null

      The commit it runs, which apply sets from ref

    • secretsrecord of string | null

      Environment variables holding secrets, each a secret(...): SANOMA_DATABASE_URL, SANOMA_SECRETS_KEY

    • portintegerrequired

      The port on 127.0.0.1 the app answers on

      at least 1, at most 65535

    • domainsrecord of string | null

      A public site's domain, by site name

      each value: matches ^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)+$

    • runningboolean | null

      Whether the container runs, which Docker says

  • handlestring

    The driver's data for the object, opaque: pass it back unchanged

delete

docker.container.deletewritesafe to retry

Delete a container; done already when it is gone

Input

  • idstringrequired

    at least 1 character

  • staterecord of any
  • handlestring

    The driver's data for the object, opaque: pass it back unchanged

Output

  • idstringrequired

    at least 1 character

  • gonetruerequired

These pages describe sanoma 0.11.24.