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
Name | Type | Default Value | Description |
---|---|---|---|
composerJson | File ! | - | No description provided |
composerLock | File | null | 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 \
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
Name | Type | Default Value | Description |
---|---|---|---|
appCode | Directory ! | - | No description provided |
path | String ! | "\/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
Name | Type | Default Value | Description |
---|---|---|---|
configTemplate | File ! | - | 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
Name | Type | Default Value | Description |
---|---|---|---|
extension | String ! | - | 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
Name | Type | Default Value | Description |
---|---|---|---|
composerVersion | String ! | "2" | No description provided |
composerCacheName | String ! | "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
Name | Type | Default Value | Description |
---|---|---|---|
composerVersion | String ! | "2" | No description provided |
composerCacheName | String ! | "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
Name | Type | Default Value | Description |
---|---|---|---|
appCode | Directory ! | - | No description provided |
path | String ! | "\/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
Name | Type | Default Value | Description |
---|---|---|---|
appCode | Directory ! | - | No description provided |
path | String ! | "\/app" | No description provided |
composerVersion | String ! | "2" | No description provided |
composerCacheName | String ! | "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
Name | Type | Default Value | Description |
---|---|---|---|
version | String ! | "8.3" | No description provided |
os | String ! | "alpine" | No description provided |
variant | String ! | "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
Name | Type | Default Value | Description |
---|---|---|---|
container | Container ! | - | 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
Name | Type | Default Value | Description |
---|---|---|---|
version | String ! | "1.27" | No description provided |
os | String ! | "alpine" | No description provided |
variant | String | null | No 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)
}