Update docker package according to op.#PushContainer
improvement
Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
This commit is contained in:
parent
a00fbb0f68
commit
7cc1c8e5dd
@ -8,7 +8,7 @@ import (
|
|||||||
|
|
||||||
// Build a Docker image from source, using included Dockerfile
|
// Build a Docker image from source, using included Dockerfile
|
||||||
#Build: {
|
#Build: {
|
||||||
source: dagger.#Artifact @dagger(input)
|
source: dagger.#Input & {dagger.#Artifact}
|
||||||
|
|
||||||
#up: [
|
#up: [
|
||||||
op.#DockerBuild & {
|
op.#DockerBuild & {
|
||||||
@ -21,7 +21,7 @@ import (
|
|||||||
// Pull a docker container
|
// Pull a docker container
|
||||||
#Pull: {
|
#Pull: {
|
||||||
// Remote ref (example: "index.docker.io/alpine:latest")
|
// Remote ref (example: "index.docker.io/alpine:latest")
|
||||||
from: string @dagger(input)
|
from: dagger.#Input & {string}
|
||||||
|
|
||||||
#up: [
|
#up: [
|
||||||
op.#FetchContainer & {ref: from},
|
op.#FetchContainer & {ref: from},
|
||||||
@ -31,18 +31,18 @@ import (
|
|||||||
// Push a docker image to a remote registry
|
// Push a docker image to a remote registry
|
||||||
#Push: {
|
#Push: {
|
||||||
// Remote target (example: "index.docker.io/alpine:latest")
|
// Remote target (example: "index.docker.io/alpine:latest")
|
||||||
target: string @dagger(input)
|
target: dagger.#Input & {string}
|
||||||
|
|
||||||
// Image source
|
// Image source
|
||||||
source: dagger.#Artifact @dagger(input)
|
source: dagger.#Input & {dagger.#Artifact}
|
||||||
|
|
||||||
// Registry auth
|
// Registry auth
|
||||||
auth?: {
|
auth?: {
|
||||||
// Username
|
// Username
|
||||||
username: string @dagger(input)
|
username: dagger.#Input & {string}
|
||||||
|
|
||||||
// Password or secret
|
// Password or secret
|
||||||
secret: string @dagger(input)
|
secret: dagger.#Input & {dagger.#Secret | string}
|
||||||
}
|
}
|
||||||
|
|
||||||
push: #up: [
|
push: #up: [
|
||||||
@ -72,7 +72,7 @@ import (
|
|||||||
source: "/image_ref"
|
source: "/image_ref"
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
} @dagger(output)
|
} & dagger.#Output
|
||||||
|
|
||||||
// Image digest
|
// Image digest
|
||||||
digest: {
|
digest: {
|
||||||
@ -85,43 +85,43 @@ import (
|
|||||||
source: "/image_digest"
|
source: "/image_digest"
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
} @dagger(output)
|
} & dagger.#Output
|
||||||
}
|
}
|
||||||
|
|
||||||
#Run: {
|
#Run: {
|
||||||
// Connect to a remote SSH server
|
// Connect to a remote SSH server
|
||||||
ssh: {
|
ssh: {
|
||||||
// ssh host
|
// ssh host
|
||||||
host: string @dagger(input)
|
host: dagger.#Input & {string}
|
||||||
|
|
||||||
// ssh user
|
// ssh user
|
||||||
user: string @dagger(input)
|
user: dagger.#Input & {string}
|
||||||
|
|
||||||
// ssh port
|
// ssh port
|
||||||
port: *22 | int @dagger(input)
|
port: dagger.#Input & {*22 | int}
|
||||||
|
|
||||||
// private key
|
// private key
|
||||||
key: dagger.#Secret @dagger(input)
|
key: dagger.#Input & {dagger.#Secret}
|
||||||
|
|
||||||
// fingerprint
|
// fingerprint
|
||||||
fingerprint?: string @dagger(input)
|
fingerprint?: dagger.#Input & {string}
|
||||||
|
|
||||||
// ssh key passphrase
|
// ssh key passphrase
|
||||||
keyPassphrase?: dagger.#Secret @dagger(input)
|
keyPassphrase?: dagger.#Input & {dagger.#Secret}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Image reference (e.g: nginx:alpine)
|
// Image reference (e.g: nginx:alpine)
|
||||||
ref: string @dagger(input)
|
ref: dagger.#Input & {string}
|
||||||
|
|
||||||
// Container name
|
// Container name
|
||||||
name?: string @dagger(input)
|
name?: dagger.#Input & {string}
|
||||||
|
|
||||||
// Image registry
|
// Image registry
|
||||||
registry?: {
|
registry?: {
|
||||||
target: string
|
target: string
|
||||||
username: string
|
username: string
|
||||||
secret: dagger.#Secret
|
secret: dagger.#Secret
|
||||||
} @dagger(input)
|
} & dagger.#Input
|
||||||
|
|
||||||
#command: #"""
|
#command: #"""
|
||||||
# Run detach container
|
# Run detach container
|
||||||
@ -150,10 +150,10 @@ import (
|
|||||||
// FIXME: incorporate into #Build
|
// FIXME: incorporate into #Build
|
||||||
#ImageFromDockerfile: {
|
#ImageFromDockerfile: {
|
||||||
// Dockerfile passed as a string
|
// Dockerfile passed as a string
|
||||||
dockerfile: string @dagger(input)
|
dockerfile: dagger.#Input & {string}
|
||||||
|
|
||||||
// Build context
|
// Build context
|
||||||
context: dagger.#Artifact @dagger(input)
|
context: dagger.#Input & {dagger.#Artifact}
|
||||||
|
|
||||||
#up: [
|
#up: [
|
||||||
op.#DockerBuild & {
|
op.#DockerBuild & {
|
||||||
|
Reference in New Issue
Block a user