This repository was archived by the owner on Dec 26, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +29
-1
lines changed Expand file tree Collapse file tree 2 files changed +29
-1
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ git_repository(
22
22
git_repository (
23
23
name = "io_bazel_rules_docker" ,
24
24
remote = "https://github.com/bazelbuild/rules_docker.git" ,
25
- tag = "v0.7 .0" ,
25
+ tag = "v0.9 .0" ,
26
26
)
27
27
28
28
load ("@rules_iota//:defs.bzl" , "iota_deps" )
@@ -32,6 +32,15 @@ container_repositories()
32
32
33
33
load ("@io_bazel_rules_docker//cc:image.bzl" , _cc_image_repos = "repositories" )
34
34
35
+ load ("@io_bazel_rules_docker//container:pull.bzl" , "container_pull" )
36
+
37
+ container_pull (
38
+ name = "ubuntu1804" ,
39
+ registry = "l.gcr.io" ,
40
+ repository = "google/ubuntu1804" ,
41
+ tag = "latest" ,
42
+ )
43
+
35
44
iota_deps ()
36
45
37
46
third_party_deps ()
Original file line number Diff line number Diff line change 1
1
load ("@io_bazel_rules_docker//cc:image.bzl" , "cc_image" )
2
2
load ("@io_bazel_rules_docker//container:container.bzl" , "container_image" )
3
+ load ("@io_bazel_rules_docker//docker/package_managers:download_pkgs.bzl" , "download_pkgs" )
4
+ load ("@io_bazel_rules_docker//docker/package_managers:install_pkgs.bzl" , "install_pkgs" )
3
5
4
6
cc_binary (
5
7
name = "accelerator" ,
@@ -52,8 +54,25 @@ cc_library(
52
54
srcs = ["cli_info.h" ],
53
55
)
54
56
57
+ download_pkgs (
58
+ name = "docker_runtime_pkgs" ,
59
+ image_tar = "@ubuntu1804//image" ,
60
+ packages = [
61
+ "uuid-runtime" ,
62
+ ],
63
+ )
64
+
65
+ install_pkgs (
66
+ name = "docker_runtime_image" ,
67
+ image_tar = "@ubuntu1804//image" ,
68
+ installables_tar = ":docker_runtime_pkgs.tar" ,
69
+ installation_cleanup_commands = "rm -rf /var/lib/apt/lists/*" ,
70
+ output_image_name = "docker_runtime_image" ,
71
+ )
72
+
55
73
cc_image (
56
74
name = "docker_base_image" ,
75
+ base = ":docker_runtime_image" ,
57
76
binary = ":accelerator" ,
58
77
)
59
78
You can’t perform that action at this time.
0 commit comments