Dagger
Search

container-image

No long description provided.

Installation

dagger install github.com/dictybase-docker/dagger-of-dcr/container-image@859d4e8ba05cf14cb1c20d944dad1f5fa9770f24

Entrypoint

Return Type
ContainerImage
Example
dagger -m github.com/dictybase-docker/dagger-of-dcr/container-image@859d4e8ba05cf14cb1c20d944dad1f5fa9770f24 call \
func (m *myModule) example() *ContainerImage  {
	return dag.
			ContainerImage()
}
@function
def example() -> dag.ContainerImage:
	return (
		dag.container_image()
	)
@func()
example(): ContainerImage {
	return dag
		.containerImage()
}

Types

ContainerImage 🔗

repository() 🔗

Repository name

Return Type
String !
Example
dagger -m github.com/dictybase-docker/dagger-of-dcr/container-image@859d4e8ba05cf14cb1c20d944dad1f5fa9770f24 call \
 repository
func (m *myModule) example(ctx context.Context) string  {
	return dag.
			ContainerImage().
			Repository(ctx)
}
@function
async def example() -> str:
	return await (
		dag.container_image()
		.repository()
	)
@func()
async example(): Promise<string> {
	return dag
		.containerImage()
		.repository()
}

ref() 🔗

Git reference

Return Type
String !
Example
dagger -m github.com/dictybase-docker/dagger-of-dcr/container-image@859d4e8ba05cf14cb1c20d944dad1f5fa9770f24 call \
 ref
func (m *myModule) example(ctx context.Context) string  {
	return dag.
			ContainerImage().
			Ref(ctx)
}
@function
async def example() -> str:
	return await (
		dag.container_image()
		.ref()
	)
@func()
async example(): Promise<string> {
	return dag
		.containerImage()
		.ref()
}

namespace() 🔗

The docker namespace under which the image will be pushed

Return Type
String !
Example
dagger -m github.com/dictybase-docker/dagger-of-dcr/container-image@859d4e8ba05cf14cb1c20d944dad1f5fa9770f24 call \
 namespace
func (m *myModule) example(ctx context.Context) string  {
	return dag.
			ContainerImage().
			Namespace(ctx)
}
@function
async def example() -> str:
	return await (
		dag.container_image()
		.namespace()
	)
@func()
async example(): Promise<string> {
	return dag
		.containerImage()
		.namespace()
}

dockerfile() 🔗

Specifies the path to the Dockerfile

Return Type
String !
Example
dagger -m github.com/dictybase-docker/dagger-of-dcr/container-image@859d4e8ba05cf14cb1c20d944dad1f5fa9770f24 call \
 dockerfile
func (m *myModule) example(ctx context.Context) string  {
	return dag.
			ContainerImage().
			Dockerfile(ctx)
}
@function
async def example() -> str:
	return await (
		dag.container_image()
		.dockerfile()
	)
@func()
async example(): Promise<string> {
	return dag
		.containerImage()
		.dockerfile()
}

image() 🔗

Name of the image to be built

Return Type
String !
Example
dagger -m github.com/dictybase-docker/dagger-of-dcr/container-image@859d4e8ba05cf14cb1c20d944dad1f5fa9770f24 call \
 image
func (m *myModule) example(ctx context.Context) string  {
	return dag.
			ContainerImage().
			Image(ctx)
}
@function
async def example() -> str:
	return await (
		dag.container_image()
		.image()
	)
@func()
async example(): Promise<string> {
	return dag
		.containerImage()
		.image()
}

dockerImageTag() 🔗

Name of the docker image tag

Return Type
String !
Example
dagger -m github.com/dictybase-docker/dagger-of-dcr/container-image@859d4e8ba05cf14cb1c20d944dad1f5fa9770f24 call \
 docker-image-tag
func (m *myModule) example(ctx context.Context) string  {
	return dag.
			ContainerImage().
			DockerImageTag(ctx)
}
@function
async def example() -> str:
	return await (
		dag.container_image()
		.docker_image_tag()
	)
@func()
async example(): Promise<string> {
	return dag
		.containerImage()
		.dockerImageTag()
}

withNamespace() 🔗

WithNamespace sets the docker namespace

Return Type
ContainerImage !
Arguments
NameTypeDefault ValueDescription
namespaceString !"dictybase"The docker namespace under which the image will be pushed
Example
dagger -m github.com/dictybase-docker/dagger-of-dcr/container-image@859d4e8ba05cf14cb1c20d944dad1f5fa9770f24 call \
 with-namespace --namespace string
func (m *myModule) example(namespace string) *ContainerImage  {
	return dag.
			ContainerImage().
			WithNamespace(namespace)
}
@function
def example(namespace: str) -> dag.ContainerImage:
	return (
		dag.container_image()
		.with_namespace(namespace)
	)
@func()
example(namespace: string): ContainerImage {
	return dag
		.containerImage()
		.withNamespace(namespace)
}

withRef() 🔗

WithRef sets the Git reference (branch, tag, or SHA)

Return Type
ContainerImage !
Arguments
NameTypeDefault ValueDescription
refString !-the branch, tag or sha to checkout
Example
dagger -m github.com/dictybase-docker/dagger-of-dcr/container-image@859d4e8ba05cf14cb1c20d944dad1f5fa9770f24 call \
 with-ref --ref string
func (m *myModule) example(ref string) *ContainerImage  {
	return dag.
			ContainerImage().
			WithRef(ref)
}
@function
def example(ref: str) -> dag.ContainerImage:
	return (
		dag.container_image()
		.with_ref(ref)
	)
@func()
example(ref: string): ContainerImage {
	return dag
		.containerImage()
		.withRef(ref)
}

withRepository() 🔗

WithRepository sets the GitHub repository name

Return Type
ContainerImage !
Arguments
NameTypeDefault ValueDescription
repositoryString !-github repository name with owner, for example tora/bora, Required
Example
dagger -m github.com/dictybase-docker/dagger-of-dcr/container-image@859d4e8ba05cf14cb1c20d944dad1f5fa9770f24 call \
 with-repository --repository string
func (m *myModule) example(repository string) *ContainerImage  {
	return dag.
			ContainerImage().
			WithRepository(repository)
}
@function
def example(repository: str) -> dag.ContainerImage:
	return (
		dag.container_image()
		.with_repository(repository)
	)
@func()
example(repository: string): ContainerImage {
	return dag
		.containerImage()
		.withRepository(repository)
}

withDockerfile() 🔗

WithDockerfile sets the Dockerfile path

Return Type
ContainerImage !
Arguments
NameTypeDefault ValueDescription
dockerFileString "build/package/Dockerfile"specifies the path to the Dockerfile
Example
dagger -m github.com/dictybase-docker/dagger-of-dcr/container-image@859d4e8ba05cf14cb1c20d944dad1f5fa9770f24 call \
 with-dockerfile
func (m *myModule) example() *ContainerImage  {
	return dag.
			ContainerImage().
			WithDockerfile()
}
@function
def example() -> dag.ContainerImage:
	return (
		dag.container_image()
		.with_dockerfile()
	)
@func()
example(): ContainerImage {
	return dag
		.containerImage()
		.withDockerfile()
}

withImage() 🔗

WithImage sets the image name

Return Type
ContainerImage !
Arguments
NameTypeDefault ValueDescription
imageString !-name of the image to be built
Example
dagger -m github.com/dictybase-docker/dagger-of-dcr/container-image@859d4e8ba05cf14cb1c20d944dad1f5fa9770f24 call \
 with-image --image string
func (m *myModule) example(image string) *ContainerImage  {
	return dag.
			ContainerImage().
			WithImage(image)
}
@function
def example(image: str) -> dag.ContainerImage:
	return (
		dag.container_image()
		.with_image(image)
	)
@func()
example(image: string): ContainerImage {
	return dag
		.containerImage()
		.withImage(image)
}

publishFromRepo() 🔗

PublishFromRepo publishes a container image to Docker Hub

Return Type
String !
Arguments
NameTypeDefault ValueDescription
userString !-dockerhub user name
passwordString !-dockerhub password, use an api token
Example
dagger -m github.com/dictybase-docker/dagger-of-dcr/container-image@859d4e8ba05cf14cb1c20d944dad1f5fa9770f24 call \
 publish-from-repo --user string --password string
func (m *myModule) example(ctx context.Context, user string, password string) string  {
	return dag.
			ContainerImage().
			PublishFromRepo(ctx, user, password)
}
@function
async def example(user: str, password: str) -> str:
	return await (
		dag.container_image()
		.publish_from_repo(user, password)
	)
@func()
async example(user: string, password: string): Promise<string> {
	return dag
		.containerImage()
		.publishFromRepo(user, password)
}

publishFromRepoWithDeploymentId() 🔗

PublishFromRepoWithDeploymentID publishes a container image to Docker Hub using deployment information from a specified GitHub deployment ID.

Return Type
Void !
Arguments
NameTypeDefault ValueDescription
userString !-dockerhub user name
passwordString !-dockerhub password, use an api token
deploymentIdString !-deployment ID
tokenString !-GitHub token for making API requests
Example
dagger -m github.com/dictybase-docker/dagger-of-dcr/container-image@859d4e8ba05cf14cb1c20d944dad1f5fa9770f24 call \
 publish-from-repo-with-deployment-id --user string --password string --deployment-id string --token string
func (m *myModule) example(ctx context.Context, user string, password string, deploymentId string, token string)   {
	return dag.
			ContainerImage().
			PublishFromRepoWithDeploymentId(ctx, user, password, deploymentId, token)
}
@function
async def example(user: str, password: str, deployment_id: str, token: str) -> None:
	return await (
		dag.container_image()
		.publish_from_repo_with_deployment_id(user, password, deployment_id, token)
	)
@func()
async example(user: string, password: string, deploymentId: string, token: string): Promise<void> {
	return dag
		.containerImage()
		.publishFromRepoWithDeploymentId(user, password, deploymentId, token)
}

fakePublishFromRepo() 🔗

FakePublishFromRepo publishes a container image to a temporary repository with a time-to-live of 10 minutes.

Return Type
String !
Example
dagger -m github.com/dictybase-docker/dagger-of-dcr/container-image@859d4e8ba05cf14cb1c20d944dad1f5fa9770f24 call \
 fake-publish-from-repo
func (m *myModule) example(ctx context.Context) string  {
	return dag.
			ContainerImage().
			FakePublishFromRepo(ctx)
}
@function
async def example() -> str:
	return await (
		dag.container_image()
		.fake_publish_from_repo()
	)
@func()
async example(): Promise<string> {
	return dag
		.containerImage()
		.fakePublishFromRepo()
}

generateImageTag() 🔗

ImageTag generates a Docker image tag based on the provided Git reference

Return Type
Container !
Example
dagger -m github.com/dictybase-docker/dagger-of-dcr/container-image@859d4e8ba05cf14cb1c20d944dad1f5fa9770f24 call \
 generate-image-tag
func (m *myModule) example() *Container  {
	return dag.
			ContainerImage().
			GenerateImageTag()
}
@function
def example() -> dagger.Container:
	return (
		dag.container_image()
		.generate_image_tag()
	)
@func()
example(): Container {
	return dag
		.containerImage()
		.generateImageTag()
}