stdlib: add alpine
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
This commit is contained in:
parent
a3e78cc558
commit
272f387737
30
stdlib/alpine/alpine.cue
Normal file
30
stdlib/alpine/alpine.cue
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
package alpine
|
||||||
|
|
||||||
|
import (
|
||||||
|
"dagger.io/dagger"
|
||||||
|
)
|
||||||
|
|
||||||
|
let defaultVersion = "3.13.2@sha256:a75afd8b57e7f34e4dad8d65e2c7ba2e1975c795ce1ee22fa34f8cf46f96a3be"
|
||||||
|
|
||||||
|
#Image: {
|
||||||
|
package: [string]: true | false | string
|
||||||
|
version: string | *defaultVersion
|
||||||
|
|
||||||
|
#dagger: compute: [
|
||||||
|
dagger.#FetchContainer & {
|
||||||
|
ref: "index.docker.io/alpine:\(version)"
|
||||||
|
},
|
||||||
|
for pkg, info in package {
|
||||||
|
if (info & true) != _|_ {
|
||||||
|
dagger.#Exec & {
|
||||||
|
args: ["apk", "add", "-U", "--no-cache", pkg]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (info & string) != _|_ {
|
||||||
|
dagger.#Exec & {
|
||||||
|
args: ["apk", "add", "-U", "--no-cache", "\(pkg)\(info)"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
]
|
||||||
|
}
|
@ -1,6 +1,9 @@
|
|||||||
package netlify
|
package netlify
|
||||||
|
|
||||||
import "dagger.io/dagger"
|
import (
|
||||||
|
"dagger.io/dagger"
|
||||||
|
"dagger.io/alpine"
|
||||||
|
)
|
||||||
|
|
||||||
// A Netlify account
|
// A Netlify account
|
||||||
#Account: {
|
#Account: {
|
||||||
@ -34,20 +37,13 @@ import "dagger.io/dagger"
|
|||||||
string
|
string
|
||||||
|
|
||||||
#dagger: compute: [
|
#dagger: compute: [
|
||||||
dagger.#FetchContainer & {
|
dagger.#Load & {
|
||||||
ref: "alpine@sha256:08d6ca16c60fe7490c03d10dc339d9fd8ea67c6466dea8d558526b1330a85930"
|
from: alpine.#Image & {
|
||||||
},
|
package: bash: "=5.1.0-r0"
|
||||||
dagger.#Exec & {
|
package: jq: "=1.6-r1"
|
||||||
args: ["apk", "add", "-U", "--no-cache", "bash=5.1.0-r0"]
|
package: curl: "=7.74.0-r0"
|
||||||
},
|
package: yarn: "=1.22.10-r0"
|
||||||
dagger.#Exec & {
|
}
|
||||||
args: ["apk", "add", "-U", "--no-cache", "jq=1.6-r1"]
|
|
||||||
},
|
|
||||||
dagger.#Exec & {
|
|
||||||
args: ["apk", "add", "-U", "--no-cache", "curl=7.74.0-r0"]
|
|
||||||
},
|
|
||||||
dagger.#Exec & {
|
|
||||||
args: ["apk", "add", "-U", "--no-cache", "yarn=1.22.10-r0"]
|
|
||||||
},
|
},
|
||||||
dagger.#Exec & {
|
dagger.#Exec & {
|
||||||
args: ["yarn", "global", "add", "netlify-cli@2.47.0"]
|
args: ["yarn", "global", "add", "netlify-cli@2.47.0"]
|
||||||
|
@ -2,6 +2,7 @@ package yarn
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"dagger.io/dagger"
|
"dagger.io/dagger"
|
||||||
|
"dagger.io/alpine"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Yarn Script
|
// Yarn Script
|
||||||
@ -20,14 +21,11 @@ import (
|
|||||||
env?: [string]: string
|
env?: [string]: string
|
||||||
|
|
||||||
#dagger: compute: [
|
#dagger: compute: [
|
||||||
dagger.#FetchContainer & {
|
dagger.#Load & {
|
||||||
ref: "alpine@sha256:08d6ca16c60fe7490c03d10dc339d9fd8ea67c6466dea8d558526b1330a85930"
|
from: alpine.#Image & {
|
||||||
},
|
package: bash: "=5.1.0-r0"
|
||||||
dagger.#Exec & {
|
package: yarn: "=1.22.10-r0"
|
||||||
args: ["apk", "add", "-U", "--no-cache", "bash=5.1.0-r0"]
|
}
|
||||||
},
|
|
||||||
dagger.#Exec & {
|
|
||||||
args: ["apk", "add", "-U", "--no-cache", "yarn=1.22.10-r0"]
|
|
||||||
},
|
},
|
||||||
dagger.#Exec & {
|
dagger.#Exec & {
|
||||||
args: [
|
args: [
|
||||||
|
Reference in New Issue
Block a user