.mise/tasks/images.toml
.mise/tasks/images.tomlBrowse 1970 files
684 tokens
2,507 bytes
Token encoding: o200k_base
Snapshot 21a254f
← Back to SKILL.md
1[image-builder-build]2run = "docker build --build-arg MISE_VERSION=$RAILPACK_MISE_VERSION -f images/debian/build/Dockerfile -t railpack-builder:local ."3 4[mise-builder-shell]5description = "Shell into the railpack-builder image"6usage = 'flag "--local" help="Build and use railpack-builder:local instead of the ghcr image"'7run = '''8if [ "${usage_local:-false}" = "true" ]; then9 mise run image-builder-build10 image="railpack-builder:local"11else12 image="ghcr.io/railwayapp/railpack-builder:mise-$RAILPACK_MISE_VERSION"13fi14exec docker run -it --rm "$image" bash15'''16 17[image-runtime-build]18run = "docker build -f images/debian/runtime/Dockerfile -t railpack-runtime:local ."19 20[image-frontend-build]21description = "Build the railpack frontend image and push to local registry"22run = [23 "docker build -f images/alpine/frontend/Dockerfile -t railpack-frontend:local .",24 # in order for builtctl to use this image, it needs to exist on a registry25 "docker tag railpack-frontend:local localhost:7890/railpack-frontend:local",26 "docker push localhost:7890/railpack-frontend:local",27]28 29[image-run-registry]30description = "Local image registry for frontend images and BuildKit cache (HTTP on :7890)"31run = '''32docker rm -f railpack-registry 2>/dev/null || true33docker run -d --rm \34 --name railpack-registry \35 -p 7890:5000 \36 registry:237'''38 39[image-frontend-build-project]40description = "Build a project dir with the local railpack frontend via buildctl with debug logging enabled and a local cache registry"41usage = 'arg "<dir>" help="Project directory to build (e.g. examples/node-bun)"'42run = '''43set -euxo pipefail44 45dir="${usage_dir:?dir is required}"46if [ ! -d "$dir" ]; then47 echo "directory not found: $dir" >&248 exit 149fi50 51project_name="$(basename "$dir")"52 53plan_dir="tmp/frontend-plan"54mkdir -p "$plan_dir"55mise run cli plan "$dir" --out "$plan_dir/railpack-plan.json"56 57# host.docker.internal is required since the frontend container is running inside a buildx container58buildctl --debug build \59 --frontend=gateway.v0 \60 --opt source=host.docker.internal:7890/railpack-frontend:local \61 --opt build-arg:verbose=true \62 --opt image-resolve-mode=pull \63 --local "context=$dir" \64 --local "dockerfile=$plan_dir" \65 --progress=plain \66 --trace="$plan_dir/build.trace" \67 --debug-json-cache-metrics stdout \68 --export-cache type=registry,ref=host.docker.internal:7890/"$project_name":cache,mode=max \69 --import-cache type=registry,ref=host.docker.internal:7890/"$project_name":cache70'''71