pkg_tar with intermediate

This commit is contained in:
Motiejus Jakštys 2021-05-24 00:11:58 +03:00
parent 5cac582944
commit 747807f1ea
2 changed files with 9 additions and 2 deletions

9
BUILD
View File

@ -1,4 +1,5 @@
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library") load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
load("@bazel_tools//tools/build_defs/pkg:pkg.bzl", "pkg_tar")
load("//src/undocker:rules.bzl", "rootfs") load("//src/undocker:rules.bzl", "rootfs")
load( load(
"@io_bazel_rules_docker//container:container.bzl", "@io_bazel_rules_docker//container:container.bzl",
@ -23,7 +24,13 @@ go_binary(
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
) )
pkg_tar(
name = "alpine-container-plus",
deps = ["@alpine//image:image"],
)
rootfs( rootfs(
name = "alpine-rootfs", name = "alpine-rootfs",
src = "@alpine//image:image", #src = "@alpine//image:image",
src = ":alpine-container-plus",
) )

View File

@ -12,7 +12,7 @@ def _rootfs_impl(ctx):
) )
return [DefaultInfo( return [DefaultInfo(
files = depset([out]), files = depset([out]),
runfiles = ctx.runfiles(files = ctx.attr.src.files.to_list()) runfiles = ctx.runfiles(files = ctx.files.src),
)] )]
rootfs = rule( rootfs = rule(