Update docker package according to op.#PushContainer improvement

Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
This commit is contained in:
Tom Chauveau 2021-08-31 13:05:22 +02:00
parent a00fbb0f68
commit 7cc1c8e5dd
No known key found for this signature in database
GPG Key ID: 3C9847D981AAC1BF

View File

@ -8,7 +8,7 @@ import (
// Build a Docker image from source, using included Dockerfile
#Build: {
source: dagger.#Artifact @dagger(input)
source: dagger.#Input & {dagger.#Artifact}
#up: [
op.#DockerBuild & {
@ -21,7 +21,7 @@ import (
// Pull a docker container
#Pull: {
// Remote ref (example: "index.docker.io/alpine:latest")
from: string @dagger(input)
from: dagger.#Input & {string}
#up: [
op.#FetchContainer & {ref: from},
@ -31,18 +31,18 @@ import (
// Push a docker image to a remote registry
#Push: {
// Remote target (example: "index.docker.io/alpine:latest")
target: string @dagger(input)
target: dagger.#Input & {string}
// Image source
source: dagger.#Artifact @dagger(input)
source: dagger.#Input & {dagger.#Artifact}
// Registry auth
auth?: {
// Username
username: string @dagger(input)
username: dagger.#Input & {string}
// Password or secret
secret: string @dagger(input)
secret: dagger.#Input & {dagger.#Secret | string}
}
push: #up: [
@ -72,7 +72,7 @@ import (
source: "/image_ref"
},
]
} @dagger(output)
} & dagger.#Output
// Image digest
digest: {
@ -85,43 +85,43 @@ import (
source: "/image_digest"
},
]
} @dagger(output)
} & dagger.#Output
}
#Run: {
// Connect to a remote SSH server
ssh: {
// ssh host
host: string @dagger(input)
host: dagger.#Input & {string}
// ssh user
user: string @dagger(input)
user: dagger.#Input & {string}
// ssh port
port: *22 | int @dagger(input)
port: dagger.#Input & {*22 | int}
// private key
key: dagger.#Secret @dagger(input)
key: dagger.#Input & {dagger.#Secret}
// fingerprint
fingerprint?: string @dagger(input)
fingerprint?: dagger.#Input & {string}
// ssh key passphrase
keyPassphrase?: dagger.#Secret @dagger(input)
keyPassphrase?: dagger.#Input & {dagger.#Secret}
}
// Image reference (e.g: nginx:alpine)
ref: string @dagger(input)
ref: dagger.#Input & {string}
// Container name
name?: string @dagger(input)
name?: dagger.#Input & {string}
// Image registry
registry?: {
target: string
username: string
secret: dagger.#Secret
} @dagger(input)
} & dagger.#Input
#command: #"""
# Run detach container
@ -150,10 +150,10 @@ import (
// FIXME: incorporate into #Build
#ImageFromDockerfile: {
// Dockerfile passed as a string
dockerfile: string @dagger(input)
dockerfile: dagger.#Input & {string}
// Build context
context: dagger.#Artifact @dagger(input)
context: dagger.#Input & {dagger.#Artifact}
#up: [
op.#DockerBuild & {