Add docker.#Client definition
Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
This commit is contained in:
parent
27a60d3cdf
commit
7c4df827c3
42
stdlib/docker/client.cue
Normal file
42
stdlib/docker/client.cue
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
package docker
|
||||||
|
|
||||||
|
import (
|
||||||
|
"dagger.io/dagger/op"
|
||||||
|
"dagger.io/alpine"
|
||||||
|
)
|
||||||
|
|
||||||
|
#Client: {
|
||||||
|
// Docker CLI version
|
||||||
|
version: *"20.10.6" | string
|
||||||
|
|
||||||
|
#Code: #"""
|
||||||
|
curl -fsSL https://download.docker.com/linux/static/stable/x86_64/docker-\#(version).tgz | tar zxvf - --strip 1 -C /usr/bin docker/docker
|
||||||
|
"""#
|
||||||
|
|
||||||
|
#up: [
|
||||||
|
op.#Load & {
|
||||||
|
from: alpine.#Image & {
|
||||||
|
package: bash: true
|
||||||
|
package: jq: true
|
||||||
|
package: curl: true
|
||||||
|
package: "openssh-client": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
op.#WriteFile & {
|
||||||
|
content: #Code
|
||||||
|
dest: "/entrypoint.sh"
|
||||||
|
},
|
||||||
|
|
||||||
|
op.#Exec & {
|
||||||
|
args: [
|
||||||
|
"/bin/sh",
|
||||||
|
"--noprofile",
|
||||||
|
"--norc",
|
||||||
|
"-eo",
|
||||||
|
"pipefail",
|
||||||
|
"/entrypoint.sh",
|
||||||
|
]
|
||||||
|
},
|
||||||
|
]
|
||||||
|
}
|
@ -91,7 +91,7 @@ import (
|
|||||||
"""#
|
"""#
|
||||||
|
|
||||||
#up: [
|
#up: [
|
||||||
op.#FetchContainer & {ref: "index.docker.io/docker:latest"},
|
op.#Load & {from: #Client},
|
||||||
|
|
||||||
op.#WriteFile & {
|
op.#WriteFile & {
|
||||||
content: key
|
content: key
|
||||||
|
Reference in New Issue
Block a user