nixpacks
This module provides a set of functions to build an OCI image from your project using nixpacks.
Installation
dagger install github.com/tsirysndr/daggerverse/nixpacks@9146ad2a58a626996489e7690c0427263ec195b4Entrypoint
Return Type
Nixpacks Example
dagger -m github.com/tsirysndr/daggerverse/nixpacks@9146ad2a58a626996489e7690c0427263ec195b4 call \
func (m *MyModule) Example() *dagger.Nixpacks {
return dag.
Nixpacks()
}@function
def example() -> dagger.Nixpacks:
return (
dag.nixpacks()
)@func()
example(): Nixpacks {
return dag
.nixpacks()
}Types
Nixpacks 🔗
build() 🔗
Build an OCI image from your project using nixpacks
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| src | Directory ! | - | No description provided |
| name | String ! | - | No description provided |
| path | String | "." | No description provided |
Example
dagger -m github.com/tsirysndr/daggerverse/nixpacks@9146ad2a58a626996489e7690c0427263ec195b4 call \
build --src DIR_PATH --name stringfunc (m *MyModule) Example(ctx context.Context, src *dagger.Directory, name string) string {
return dag.
Nixpacks().
Build(ctx, src, name)
}@function
async def example(src: dagger.Directory, name: str) -> str:
return await (
dag.nixpacks()
.build(src, name)
)@func()
async example(src: Directory, name: string): Promise<string> {
return dag
.nixpacks()
.build(src, name)
}plan() 🔗
Generate a plan for building an OCI image from your project using nixpacks
Return Type
File !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| src | Directory ! | - | No description provided |
| path | String | "." | No description provided |
| format | String | "json" | No description provided |
Example
dagger -m github.com/tsirysndr/daggerverse/nixpacks@9146ad2a58a626996489e7690c0427263ec195b4 call \
plan --src DIR_PATHfunc (m *MyModule) Example(src *dagger.Directory) *dagger.File {
return dag.
Nixpacks().
Plan(src)
}@function
def example(src: dagger.Directory) -> dagger.File:
return (
dag.nixpacks()
.plan(src)
)@func()
example(src: Directory): File {
return dag
.nixpacks()
.plan(src)
}dev() 🔗
Return a Container with nixpacks installed
Return Type
Container !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| src | Directory | - | No description provided |
Example
dagger -m github.com/tsirysndr/daggerverse/nixpacks@9146ad2a58a626996489e7690c0427263ec195b4 call \
devfunc (m *MyModule) Example() *dagger.Container {
return dag.
Nixpacks().
Dev()
}@function
def example() -> dagger.Container:
return (
dag.nixpacks()
.dev()
)@func()
example(): Container {
return dag
.nixpacks()
.dev()
}publish() 🔗
Publish an OCI image to a registry
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| username | String ! | - | No description provided |
| password | Secret ! | - | No description provided |
| ref | String ! | - | No description provided |
| registry | String | "docker.io" | No description provided |
Example
dagger -m github.com/tsirysndr/daggerverse/nixpacks@9146ad2a58a626996489e7690c0427263ec195b4 call \
publish --username string --password env:MYSECRET --ref stringfunc (m *MyModule) Example(ctx context.Context, username string, password *dagger.Secret, ref string) string {
return dag.
Nixpacks().
Publish(ctx, username, password, ref)
}@function
async def example(username: str, password: dagger.Secret, ref: str) -> str:
return await (
dag.nixpacks()
.publish(username, password, ref)
)@func()
async example(username: string, password: Secret, ref: string): Promise<string> {
return dag
.nixpacks()
.publish(username, password, ref)
}