Dagger
Search

nginx

Module for building Nginx containers to serve the given
directory.

Installation

dagger install github.com/kpenfound/dagger-modules/nginx@v0.1.0

Entrypoint

Return Type
Nginx !
Arguments
NameTypeDescription
versionString The nginx container tag
Example
dagger -m github.com/kpenfound/dagger-modules/nginx@0df7a391ab3ad75c2ce71a3928740c478a288960 call \
func (m *myModule) example() *Nginx  {
	return dag.
			Nginx()
}
@function
def example() -> dag.Nginx:
	return (
		dag.nginx()
	)
@func()
example(): Nginx {
	return dag
		.nginx()
}

Types

Nginx 🔗

version() 🔗

Return Type
String !
Example
dagger -m github.com/kpenfound/dagger-modules/nginx@0df7a391ab3ad75c2ce71a3928740c478a288960 call \
 version
func (m *myModule) example(ctx context.Context) string  {
	return dag.
			Nginx().
			Version(ctx)
}
@function
async def example() -> str:
	return await (
		dag.nginx()
		.version()
	)
@func()
async example(): Promise<string> {
	return dag
		.nginx()
		.version()
}

dir() 🔗

Return Type
Directory !
Example
dagger -m github.com/kpenfound/dagger-modules/nginx@0df7a391ab3ad75c2ce71a3928740c478a288960 call \
 dir
func (m *myModule) example() *Directory  {
	return dag.
			Nginx().
			Dir()
}
@function
def example() -> dagger.Directory:
	return (
		dag.nginx()
		.dir()
	)
@func()
example(): Directory {
	return dag
		.nginx()
		.dir()
}

withVersion() 🔗

Specify a tag of nginx to use

Return Type
Nginx !
Arguments
NameTypeDefault ValueDescription
versionString !-The nginx container tag
Example
dagger -m github.com/kpenfound/dagger-modules/nginx@0df7a391ab3ad75c2ce71a3928740c478a288960 call \
 with-version --version string
func (m *myModule) example(version string) *Nginx  {
	return dag.
			Nginx().
			WithVersion(version)
}
@function
def example(version: str) -> dag.Nginx:
	return (
		dag.nginx()
		.with_version(version)
	)
@func()
example(version: string): Nginx {
	return dag
		.nginx()
		.withVersion(version)
}

withDirectory() 🔗

Add a directory for nginx to serve

Return Type
Nginx !
Arguments
NameTypeDefault ValueDescription
directoryDirectory !-The directory for nginx to serve
Example
dagger -m github.com/kpenfound/dagger-modules/nginx@0df7a391ab3ad75c2ce71a3928740c478a288960 call \
 with-directory --directory DIR_PATH
func (m *myModule) example(directory *Directory) *Nginx  {
	return dag.
			Nginx().
			WithDirectory(directory)
}
@function
def example(directory: dagger.Directory) -> dag.Nginx:
	return (
		dag.nginx()
		.with_directory(directory)
	)
@func()
example(directory: Directory): Nginx {
	return dag
		.nginx()
		.withDirectory(directory)
}

container() 🔗

Get the nginx container with the directory in it

Return Type
Container !
Arguments
NameTypeDefault ValueDescription
platformString -The platform of the container
Example
dagger -m github.com/kpenfound/dagger-modules/nginx@0df7a391ab3ad75c2ce71a3928740c478a288960 call \
 container
func (m *myModule) example() *Container  {
	return dag.
			Nginx().
			Container()
}
@function
def example() -> dagger.Container:
	return (
		dag.nginx()
		.container()
	)
@func()
example(): Container {
	return dag
		.nginx()
		.container()
}