Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: Arik Hadas <[email protected]>
  • Loading branch information
ahadas committed Jun 20, 2024
1 parent 6be3bae commit 52d989f
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions operator/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ load(
)
load("@io_bazel_rules_docker//docker/util:run.bzl", "container_run_and_commit_layer")


genrule(
name = "kustomize_bin",
srcs = ["@kustomize//file"],
Expand All @@ -20,30 +19,34 @@ container_image(
base = "@ansible-operator//image",
directory = "/opt/ansible",
files = [
"requirements.yml",
"watches.yaml",
"roles",
"requirements.yml",
"watches.yaml",
"roles",
],
)

container_run_and_commit_layer(
name = "forklift-operator-image-layer-run",
image = ":forklift-operator-base-image.tar",
commands = [
"ansible-galaxy collection install -r /opt/ansible/requirements.yml && chmod -R ug+rwx /opt/ansible/.ansible",
"ansible-galaxy collection install -r /opt/ansible/requirements.yml && chmod -R ug+rwx /opt/ansible/.ansible",
],
docker_run_flags = ["--entrypoint=''"],
image = ":forklift-operator-base-image.tar",
)

container_image(
name = "forklift-operator-image",
base = ":forklift-operator-base-image",
#base = "@ansible-operator//image",
directory = "/opt/ansible",
entrypoint = [
"/usr/bin/tini",
"--",
"/usr/local/bin/ansible-operator",
"run",
"--watches-file=./watches.yaml"],
layers = [
":forklift-operator-image-layer-run",
":forklift-operator-image-layer-run",
],
directory = "/opt/ansible",
entrypoint = ["/usr/bin/tini", "--", "/usr/local/bin/ansible-operator", "run", "--watches-file=./watches.yaml"],
user = "1001",
visibility = ["//visibility:public"],
)
Expand Down

0 comments on commit 52d989f

Please sign in to comment.