Skip to content

Commit

Permalink
chore(IDX): oci pull from ghcr mirror (#2367)
Browse files Browse the repository at this point in the history
Use container images from GHCR.
  • Loading branch information
marko-k0 authored Oct 31, 2024
1 parent 73315bb commit 000547c
Showing 1 changed file with 12 additions and 22 deletions.
34 changes: 12 additions & 22 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@ use_repo(
)

# Docker/OCI & archive rules with image definitions
# Mirror image to GHCR if image is in DockerHub:
# 1st PR: add it to the list .github/workflows/container-mirror-images.json
# 2nd PR: add it below

bazel_dep(name = "rules_pkg", version = "1.0.1")
bazel_dep(name = "rules_oci", version = "2.0.0")
Expand All @@ -128,11 +131,7 @@ oci = use_extension("@rules_oci//oci:extensions.bzl", "oci")
# file server used in tests
oci.pull(
name = "static-file-server",
# $ docker pull halverneus/static-file-server
# $ docker tag halverneus/static-file-server dfinitydev/halverneus-static-file-server:latest
# $ docker push dfinitydev/halverneus-static-file-server:latest
#latest: digest: sha256:...
image = "docker.io/dfinitydev/halverneus-static-file-server@sha256:80eb204716e0928e27e378ed817056c1167b2b1a878b1ac4ce496964dd9a3ccd",
image = "ghcr.io/dfinity/halverneus/static-file-server@sha256:9e46688910b1cf9328c3b55784f08a63c53e70a276ccaf76bfdaaf2fbd0019fa",
platforms = [
"linux/amd64",
],
Expand All @@ -142,24 +141,15 @@ use_repo(oci, "static-file-server", "static-file-server_linux_amd64")
# bitcoin container used in test
oci.pull(
name = "bitcoind",
image = "docker.io/kylemanna/bitcoind@sha256:17c7dd21690f3be34630db7389d2f0bff14649e27a964afef03806a6d631e0f1",
image = "ghcr.io/dfinity/kylemanna/bitcoind@sha256:17c7dd21690f3be34630db7389d2f0bff14649e27a964afef03806a6d631e0f1",
platforms = [
"linux/amd64",
],
)
use_repo(oci, "bitcoind", "bitcoind_linux_amd64")

# Tracing image used in tests
# we can't use the official image: https://github.com/bazel-contrib/rules_oci/issues/695
#
# Instead we copy the official image to our repository:
# $ docker pull jaegertracing/all-in-one
# $ docker tag jaegertracing/all-in-one dfinitydev/jaegertracing-all-in-one:latest
# $ docker push jaegertracing-all-in-one:latest
# > latest: digest: sha256:...
oci.pull(
name = "jaeger",
image = "docker.io/dfinitydev/jaegertracing-all-in-one@sha256:b85a6bbb949a62377010b8418d7a860c9d0ea7058d83e7cb5ade4fba046c4a76",
image = "ghcr.io/dfinity/jaegertracing/all-in-one@sha256:836e9b69c88afbedf7683ea7162e179de63b1f981662e83f5ebb68badadc710f",
platforms = [
"linux/amd64",
],
Expand All @@ -169,7 +159,7 @@ use_repo(oci, "jaeger", "jaeger_linux_amd64")
# Used by tests
oci.pull(
name = "minica",
image = "docker.io/ryantk/minica@sha256:c67e2c1885d438b5927176295d41aaab8a72dd9e1272ba85054bfc78191d05b0",
image = "ghcr.io/dfinity/ryantk/minica@sha256:c67e2c1885d438b5927176295d41aaab8a72dd9e1272ba85054bfc78191d05b0",
platforms = ["linux/amd64"],
)
use_repo(oci, "minica", "minica_linux_amd64")
Expand All @@ -185,35 +175,35 @@ use_repo(oci, "rust_base", "rust_base_linux_amd64")
# used in various places as base
oci.pull(
name = "ubuntu_base",
image = "docker.io/library/ubuntu@sha256:965fbcae990b0467ed5657caceaec165018ef44a4d2d46c7cdea80a9dff0d1ea",
image = "ghcr.io/dfinity/ubuntu@sha256:965fbcae990b0467ed5657caceaec165018ef44a4d2d46c7cdea80a9dff0d1ea",
platforms = ["linux/amd64"],
)
use_repo(oci, "ubuntu_base", "ubuntu_base_linux_amd64")

# used by boundary node tests
oci.pull(
name = "coredns",
image = "docker.io/coredns/coredns@sha256:be7652ce0b43b1339f3d14d9b14af9f588578011092c1f7893bd55432d83a378",
image = "ghcr.io/dfinity/coredns/coredns@sha256:be7652ce0b43b1339f3d14d9b14af9f588578011092c1f7893bd55432d83a378",
platforms = ["linux/amd64"],
)
use_repo(oci, "coredns", "coredns_linux_amd64")

# used by custom domains tests
oci.pull(
name = "pebble",
image = "docker.io/letsencrypt/pebble@sha256:fc5a537bf8fbc7cc63aa24ec3142283aa9b6ba54529f86eb8ff31fbde7c5b258",
image = "ghcr.io/dfinity/letsencrypt/pebble@sha256:fc5a537bf8fbc7cc63aa24ec3142283aa9b6ba54529f86eb8ff31fbde7c5b258",
platforms = ["linux/amd64"],
)
use_repo(oci, "pebble", "pebble_linux_amd64")
oci.pull(
name = "python3",
image = "docker.io/library/python@sha256:0a56f24afa1fc7f518aa690cb8c7be661225e40b157d9bb8c6ef402164d9faa7",
image = "ghcr.io/dfinity/library/python@sha256:0a56f24afa1fc7f518aa690cb8c7be661225e40b157d9bb8c6ef402164d9faa7",
platforms = ["linux/amd64"],
)
use_repo(oci, "python3", "python3_linux_amd64")
oci.pull(
name = "alpine_openssl",
image = "docker.io/alpine/openssl@sha256:cf89651f07a33d2faf4499f72e6f8b0ee2542cd40735d51c7e75b8965c17af0e",
image = "ghcr.io/dfinity/alpine/openssl@sha256:cf89651f07a33d2faf4499f72e6f8b0ee2542cd40735d51c7e75b8965c17af0e",
platforms = ["linux/amd64"],
)
use_repo(oci, "alpine_openssl", "alpine_openssl_linux_amd64")
Expand Down

0 comments on commit 000547c

Please sign in to comment.