Dagger
Search

sai

No long description provided.

Installation

dagger install github.com/sai-php/sai@18c8517abca0b8b377d58af99c9b155490361cdf

Entrypoint

Return Type
Sai
Example
dagger -m github.com/sai-php/sai@18c8517abca0b8b377d58af99c9b155490361cdf call \
func (m *myModule) example() *Sai  {
	return dag.
			Sai()
}
@function
def example() -> dag.Sai:
	return (
		dag.sai()
	)
@func()
example(): Sai {
	return dag
		.sai()
}

Types

Composer 🔗

install() 🔗

Perform a composer install and return the result as a directory

Return Type
Directory !
Arguments
NameTypeDefault ValueDescription
composerJsonFile !-No description provided
composerLockFile nullNo description provided
Example
dagger -m github.com/sai-php/sai@18c8517abca0b8b377d58af99c9b155490361cdf call \
 adopt-phpcontainer --container IMAGE:TAG \
 composer --composer-version string --composer-cache-name string \
 install --composer-json file:path
func (m *myModule) example(container *Container, composerVersion string, composerCacheName string, composerJson *File) *Directory  {
	return dag.
			Sai().
			AdoptPhpcontainer(container).
			Composer(composerVersion, composerCacheName).
			Install(composerJson)
}
@function
def example(container: dagger.Container, composer_version: str, composer_cache_name: str, composer_json: dagger.File) -> dagger.Directory:
	return (
		dag.sai()
		.adopt_phpcontainer(container)
		.composer(composer_version, composer_cache_name)
		.install(composer_json)
	)
@func()
example(container: Container, composerVersion: string, composerCacheName: string, composerJson: File): Directory {
	return dag
		.sai()
		.adoptPhpcontainer(container)
		.composer(composerVersion, composerCacheName)
		.install(composerJson)
}

NginxContainer 🔗

withAppCode() 🔗

Add application code to container

Return Type
NginxContainer !
Arguments
NameTypeDefault ValueDescription
appCodeDirectory !-No description provided
pathString !"\/app"No description provided
Example
dagger -m github.com/sai-php/sai@18c8517abca0b8b377d58af99c9b155490361cdf call \
 nginx --version string --os string \
 with-app-code --app-code DIR_PATH --path string
func (m *myModule) example(version string, os string, appCode *Directory, path string) *SaiNginxContainer  {
	return dag.
			Sai().
			Nginx(version, os).
			WithAppCode(appCode, path)
}
@function
def example(version: str, os: str, app_code: dagger.Directory, path: str) -> dag.SaiNginxContainer:
	return (
		dag.sai()
		.nginx(version, os)
		.with_app_code(app_code, path)
	)
@func()
example(version: string, os: string, appCode: Directory, path: string): SaiNginxContainer {
	return dag
		.sai()
		.nginx(version, os)
		.withAppCode(appCode, path)
}

withConfigTemplate() 🔗

Add config template to the container

Return Type
NginxContainer !
Arguments
NameTypeDefault ValueDescription
configTemplateFile !-No description provided
Example
dagger -m github.com/sai-php/sai@18c8517abca0b8b377d58af99c9b155490361cdf call \
 nginx --version string --os string \
 with-config-template --config-template file:path
func (m *myModule) example(version string, os string, configTemplate *File) *SaiNginxContainer  {
	return dag.
			Sai().
			Nginx(version, os).
			WithConfigTemplate(configTemplate)
}
@function
def example(version: str, os: str, config_template: dagger.File) -> dag.SaiNginxContainer:
	return (
		dag.sai()
		.nginx(version, os)
		.with_config_template(config_template)
	)
@func()
example(version: string, os: string, configTemplate: File): SaiNginxContainer {
	return dag
		.sai()
		.nginx(version, os)
		.withConfigTemplate(configTemplate)
}

container() 🔗

Returns the built Nginx container

Return Type
Container !
Example
dagger -m github.com/sai-php/sai@18c8517abca0b8b377d58af99c9b155490361cdf call \
 nginx --version string --os string \
 container
func (m *myModule) example(version string, os string) *Container  {
	return dag.
			Sai().
			Nginx(version, os).
			Container()
}
@function
def example(version: str, os: str) -> dagger.Container:
	return (
		dag.sai()
		.nginx(version, os)
		.container()
	)
@func()
example(version: string, os: string): Container {
	return dag
		.sai()
		.nginx(version, os)
		.container()
}

Phpcontainer 🔗

withExtension() 🔗

Install a PHP extension into the container

Return Type
Phpcontainer !
Arguments
NameTypeDefault ValueDescription
extensionString !-No description provided
Example
dagger -m github.com/sai-php/sai@18c8517abca0b8b377d58af99c9b155490361cdf call \
 adopt-phpcontainer --container IMAGE:TAG \
 with-extension --extension string
func (m *myModule) example(container *Container, extension string) *SaiPhpcontainer  {
	return dag.
			Sai().
			AdoptPhpcontainer(container).
			WithExtension(extension)
}
@function
def example(container: dagger.Container, extension: str) -> dag.SaiPhpcontainer:
	return (
		dag.sai()
		.adopt_phpcontainer(container)
		.with_extension(extension)
	)
@func()
example(container: Container, extension: string): SaiPhpcontainer {
	return dag
		.sai()
		.adoptPhpcontainer(container)
		.withExtension(extension)
}

withComposer() 🔗

Install composer into the container, useful if you need a container with composer in it, but to run composer commands see the composer() function.

Return Type
Phpcontainer !
Arguments
NameTypeDefault ValueDescription
composerVersionString !"2"No description provided
composerCacheNameString !"sai-composer-cache"No description provided
Example
dagger -m github.com/sai-php/sai@18c8517abca0b8b377d58af99c9b155490361cdf call \
 adopt-phpcontainer --container IMAGE:TAG \
 with-composer --composer-version string --composer-cache-name string
func (m *myModule) example(container *Container, composerVersion string, composerCacheName string) *SaiPhpcontainer  {
	return dag.
			Sai().
			AdoptPhpcontainer(container).
			WithComposer(composerVersion, composerCacheName)
}
@function
def example(container: dagger.Container, composer_version: str, composer_cache_name: str) -> dag.SaiPhpcontainer:
	return (
		dag.sai()
		.adopt_phpcontainer(container)
		.with_composer(composer_version, composer_cache_name)
	)
@func()
example(container: Container, composerVersion: string, composerCacheName: string): SaiPhpcontainer {
	return dag
		.sai()
		.adoptPhpcontainer(container)
		.withComposer(composerVersion, composerCacheName)
}

composer() 🔗

Returns a composer object which can operate with your container

Return Type
Composer !
Arguments
NameTypeDefault ValueDescription
composerVersionString !"2"No description provided
composerCacheNameString !"sai-composer-cache"No description provided
Example
dagger -m github.com/sai-php/sai@18c8517abca0b8b377d58af99c9b155490361cdf call \
 adopt-phpcontainer --container IMAGE:TAG \
 composer --composer-version string --composer-cache-name string
func (m *myModule) example(container *Container, composerVersion string, composerCacheName string) *SaiComposer  {
	return dag.
			Sai().
			AdoptPhpcontainer(container).
			Composer(composerVersion, composerCacheName)
}
@function
def example(container: dagger.Container, composer_version: str, composer_cache_name: str) -> dag.SaiComposer:
	return (
		dag.sai()
		.adopt_phpcontainer(container)
		.composer(composer_version, composer_cache_name)
	)
@func()
example(container: Container, composerVersion: string, composerCacheName: string): SaiComposer {
	return dag
		.sai()
		.adoptPhpcontainer(container)
		.composer(composerVersion, composerCacheName)
}

withAppCode() 🔗

Add application code to container

Return Type
Phpcontainer !
Arguments
NameTypeDefault ValueDescription
appCodeDirectory !-No description provided
pathString !"\/app"No description provided
Example
dagger -m github.com/sai-php/sai@18c8517abca0b8b377d58af99c9b155490361cdf call \
 adopt-phpcontainer --container IMAGE:TAG \
 with-app-code --app-code DIR_PATH --path string
func (m *myModule) example(container *Container, appCode *Directory, path string) *SaiPhpcontainer  {
	return dag.
			Sai().
			AdoptPhpcontainer(container).
			WithAppCode(appCode, path)
}
@function
def example(container: dagger.Container, app_code: dagger.Directory, path: str) -> dag.SaiPhpcontainer:
	return (
		dag.sai()
		.adopt_phpcontainer(container)
		.with_app_code(app_code, path)
	)
@func()
example(container: Container, appCode: Directory, path: string): SaiPhpcontainer {
	return dag
		.sai()
		.adoptPhpcontainer(container)
		.withAppCode(appCode, path)
}

withComposerApp() 🔗

Adds application code which uses composer to manage dependencies. Requires a composer.json in the root of the directory. Will do an install of the dependencies using Composer.

Return Type
Phpcontainer !
Arguments
NameTypeDefault ValueDescription
appCodeDirectory !-No description provided
pathString !"\/app"No description provided
composerVersionString !"2"No description provided
composerCacheNameString !"sai-composer-cache"No description provided
Example
dagger -m github.com/sai-php/sai@18c8517abca0b8b377d58af99c9b155490361cdf call \
 adopt-phpcontainer --container IMAGE:TAG \
 with-composer-app --app-code DIR_PATH --path string --composer-version string --composer-cache-name string
func (m *myModule) example(container *Container, appCode *Directory, path string, composerVersion string, composerCacheName string) *SaiPhpcontainer  {
	return dag.
			Sai().
			AdoptPhpcontainer(container).
			WithComposerApp(appCode, path, composerVersion, composerCacheName)
}
@function
def example(container: dagger.Container, app_code: dagger.Directory, path: str, composer_version: str, composer_cache_name: str) -> dag.SaiPhpcontainer:
	return (
		dag.sai()
		.adopt_phpcontainer(container)
		.with_composer_app(app_code, path, composer_version, composer_cache_name)
	)
@func()
example(container: Container, appCode: Directory, path: string, composerVersion: string, composerCacheName: string): SaiPhpcontainer {
	return dag
		.sai()
		.adoptPhpcontainer(container)
		.withComposerApp(appCode, path, composerVersion, composerCacheName)
}

container() 🔗

Returns the built PHP container

Return Type
Container !
Example
dagger -m github.com/sai-php/sai@18c8517abca0b8b377d58af99c9b155490361cdf call \
 adopt-phpcontainer --container IMAGE:TAG \
 container
func (m *myModule) example(container *Container) *Container  {
	return dag.
			Sai().
			AdoptPhpcontainer(container).
			Container()
}
@function
def example(container: dagger.Container) -> dagger.Container:
	return (
		dag.sai()
		.adopt_phpcontainer(container)
		.container()
	)
@func()
example(container: Container): Container {
	return dag
		.sai()
		.adoptPhpcontainer(container)
		.container()
}

Sai 🔗

php() 🔗

Return Type
Phpcontainer !
Arguments
NameTypeDefault ValueDescription
versionString !"8.3"No description provided
osString !"alpine"No description provided
variantString !"cli"No description provided
Example
dagger -m github.com/sai-php/sai@18c8517abca0b8b377d58af99c9b155490361cdf call \
 php --version string --os string --variant string
func (m *myModule) example(version string, os string, variant string) *SaiPhpcontainer  {
	return dag.
			Sai().
			Php(version, os, variant)
}
@function
def example(version: str, os: str, variant: str) -> dag.SaiPhpcontainer:
	return (
		dag.sai()
		.php(version, os, variant)
	)
@func()
example(version: string, os: string, variant: string): SaiPhpcontainer {
	return dag
		.sai()
		.php(version, os, variant)
}

adoptPhpcontainer() 🔗

Return Type
Phpcontainer !
Arguments
NameTypeDefault ValueDescription
containerContainer !-No description provided
Example
dagger -m github.com/sai-php/sai@18c8517abca0b8b377d58af99c9b155490361cdf call \
 adopt-phpcontainer --container IMAGE:TAG
func (m *myModule) example(container *Container) *SaiPhpcontainer  {
	return dag.
			Sai().
			AdoptPhpcontainer(container)
}
@function
def example(container: dagger.Container) -> dag.SaiPhpcontainer:
	return (
		dag.sai()
		.adopt_phpcontainer(container)
	)
@func()
example(container: Container): SaiPhpcontainer {
	return dag
		.sai()
		.adoptPhpcontainer(container)
}

nginx() 🔗

Return Type
NginxContainer !
Arguments
NameTypeDefault ValueDescription
versionString !"1.27"No description provided
osString !"alpine"No description provided
variantString nullNo description provided
Example
dagger -m github.com/sai-php/sai@18c8517abca0b8b377d58af99c9b155490361cdf call \
 nginx --version string --os string
func (m *myModule) example(version string, os string) *SaiNginxContainer  {
	return dag.
			Sai().
			Nginx(version, os)
}
@function
def example(version: str, os: str) -> dag.SaiNginxContainer:
	return (
		dag.sai()
		.nginx(version, os)
	)
@func()
example(version: string, os: string): SaiNginxContainer {
	return dag
		.sai()
		.nginx(version, os)
}