| load("//bazel:skia_app_container.bzl", "skia_app_container") |
| |
| skia_app_container( |
| name = "docker_pushes_watcher_container", |
| base_image = "@base-cipd//image", |
| dirs = { |
| "/usr/local/bin": [ |
| [ |
| "//docker_pushes_watcher/go/docker_pushes_watcher:docker_pushes_watcher", |
| "0755", |
| ], |
| [ |
| "//kube/go/pushk:pushk", |
| "0755", |
| ], |
| ], |
| "/etc/docker_pushes_watcher/": [ |
| [ |
| "//kube/clusters:config.json", |
| "0644", |
| ], |
| ], |
| }, |
| entrypoint = "/usr/local/bin/docker_pushes_watcher", |
| repository = "skia-public/docker_pushes_watcher", |
| run_commands_root = [ |
| # Install kubectl. |
| "apt-get update", |
| "apt-get install -y curl bash software-properties-common gnupg2 ca-certificates gnupg", |
| "curl https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl -o /usr/local/bin/kubectl", |
| "chmod +x /usr/local/bin/kubectl", |
| # Install docker. https://docs.docker.com/engine/install/debian/ |
| "install -m 0755 -d /etc/apt/keyrings", |
| "curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg", |
| # Escaping double quotes instead of using single quotes caused this to fail completely for unknown reasons. |
| # Single quotes to the rescue! |
| "echo 'deb [arch=amd64 signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian bookworm stable' > /etc/apt/sources.list.d/docker.list", |
| "cat /etc/apt/sources.list.d/docker.list", |
| "apt-get update", |
| "apt-get install -y docker-ce docker-ce-cli", |
| ], |
| ) |