skip to Main Content

I’m attempting to set up AlloyDB Omni locally using a Dockerfile following the guidelines provided in the official Google documentation.

Below is the Dockerfile configuration I’m using:

FROM ubuntu:latest

# Install necessary packages and dependencies
RUN apt-get update && apt-get install -y 
    software-properties-common 
    sudo 
    curl 
    gnupg 
    && rm -rf /var/lib/apt/lists/*

# Add AlloyDB repository
RUN curl https://europe-apt.pkg.dev/doc/repo-signing-key.gpg | sudo apt-key add -
RUN echo "deb [arch=amd64] https://europe-apt.pkg.dev/projects/alloydb-omni alloydb-omni-apt main" | sudo tee -a /etc/apt/sources.list.d/artifact-registry.list

# Update repositories and install alloydb-cli
RUN apt-get update && apt-get install -y alloydb-cli

However, during the Docker build process, the installation fails with the error:

Unable to locate package alloydb-cli

Upon further investigation, I found a log entry indicating:

Skipping acquire of configured file ‘main/binary-arm64/Packages’ as
repository ‘https://europe-apt.pkg.dev/projects/alloydb-omni
alloydb-omni-apt InRelease’ doesn’t support architecture ‘arm64’

It seems that AlloyDB Omni CLI supports the AMD64 architecture, but I’m working on an ARM architecture, causing this installation issue.

I’m seeking guidance or potential workarounds to overcome this architectural mismatch. My ultimate objective is to create a Dockerfile that can set up AlloyDB locally, similar to setting up other databases like PostgreSQL. However, since AlloyDB doesn’t offer official Docker images, I’m attempting to build one myself and encountered this hurdle.

Any insights or suggestions on how to resolve this issue within the Dockerfile would be greatly appreciated. Thank you!

2

Answers


  1. You can replace

    FROM ubuntu:latest

    to

    FROM --platform=linux/amd64 ubuntu:latest
    
    Login or Signup to reply.
  2. Were you able to get this working with Docker in Docker? Even when docker run hello-world in the container succeeds I get stuck on:

    ERROR: failed AlloyDB Omni system check: Docker installation not found.
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search