This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
dagger/stdlib/alpine/alpine.cue
Sam Alba 5d22e9ed43 stdlib: updated alpine base image and fixed pkg dependencies in sub libs
Signed-off-by: Sam Alba <sam.alba@gmail.com>
2021-04-14 14:06:51 -07:00

31 lines
593 B
CUE

package alpine
import (
"dagger.io/dagger/op"
)
let defaultVersion = "3.13.5@sha256:69e70a79f2d41ab5d637de98c1e0b055206ba40a8145e7bddb55ccc04e13cf8f"
#Image: {
package: [string]: true | false | string
version: string | *defaultVersion
#up: [
op.#FetchContainer & {
ref: "index.docker.io/alpine:\(version)"
},
for pkg, info in package {
if (info & true) != _|_ {
op.#Exec & {
args: ["apk", "add", "-U", "--no-cache", pkg]
}
}
if (info & string) != _|_ {
op.#Exec & {
args: ["apk", "add", "-U", "--no-cache", "\(pkg)\(info)"]
}
}
},
]
}