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/pkg/universe.dagger.io/alpine/alpine.cue
Solomon Hykes 354334a3dc Simplify docker.#Run
* `cmd` is renamed to `command` for readability
  * `script` is removed. Feature moves up the stack (bash.#Run,
    python.#Run)

Signed-off-by: Solomon Hykes <solomon@dagger.io>
2022-02-08 01:35:51 +00:00

43 lines
974 B
CUE

// Base package for Alpine Linux
package alpine
import (
"universe.dagger.io/docker"
)
// Build an Alpine Linux container image
#Build: {
// Alpine version to install.
version: string | *"3.15.0@sha256:21a3deaa0d32a8057914f36584b5288d2e5ecc984380bc0118285c70fa8c9300"
// List of packages to install
packages: [pkgName=string]: {
// NOTE(samalba, gh issue #1532):
// it's not recommended to pin the version as it is already pinned by the major Alpine version
// version pinning is for future use (as soon as we support custom repositories like `community`,
// `testing` or `edge`)
version: string | *""
}
docker.#Build & {
steps: [
docker.#Pull & {
source: "index.docker.io/alpine:\(version)"
},
for pkgName, pkg in packages {
docker.#Run & {
command: {
name: "apk"
args: ["add", "\(pkgName)\(pkg.version)"]
flags: {
"-U": true
"--no-cache": true
}
}
}
},
]
}
}