openlibrary icon indicating copy to clipboard operation
openlibrary copied to clipboard

Docker build failure for mac M2

Open ronibhakta1 opened this issue 2 years ago • 3 comments

Problem

@avidseeker please look at this issue and try fixing it ASAP! :)

When i'm trying to build docker on my machine its throwing this error Screenshot 2024-11-23 at 2 29 37 PM

=> ERROR [home internal] load metadata for docker.io/openlibrary/olbase: 6.8s => [solr-updater auth] openlibrary/olbase:pull token for registry-1.dock 0.0s

[home internal] load metadata for docker.io/openlibrary/olbase:latest:


failed to solve: openlibrary/olbase:latest: failed to resolve source metadata for docker.io/openlibrary/olbase:latest: no match for platform in manifest: not found

i have tried composing it also this is what i got Screenshot 2024-11-23 at 2 30 20 PM

Reproducing the bug

  1. download the github file on your local machine
  2. go to the file Dir and use following commands as per mentioned inside the docker readme file
  3. docker run hello-world
  4. docker compose build
  5. docker compose up
  • Expected behavior: *setup the docker file using config as required and start the local run

Context

  • Browser (Chrome, Safari, Firefox, etc): Chrome
  • OS (Windows, Mac, etc): Mac M2 Air
  • Logged in (Y/N): Y
  • Environment (prod, dev, local): local

Breakdown

Requirements Checklist

  • [ ]

Related files

*

Stakeholders

*


Instructions for Contributors

  • Please run these commands to ensure your repository is up to date before creating a new branch to work on this issue and each time after pushing code to Github, because the pre-commit bot may add commits to your PRs upstream.

ronibhakta1 avatar Nov 23 '24 09:11 ronibhakta1

Hey i have got the fix for mac M2 Air run following codes to use the docker in your local machine !! cd openlibrary ls docker/ docker build -f docker/Dockerfile.olbase -t openlibrary/olbase:latest . I notice from your directory listing that the file is named Dockerfile.olbase, not Dockerfile.base. Let's correct the command: The error was occurring because we were trying to use Dockerfile.base when the actual file is named Dockerfile.olbase. Try running this corrected command and let me know what happens. This should start building the base image correctly. Once this completes successfully, we can proceed with the docker compose build command. all steps are mentioned in the docker readme file :)

ronibhakta1 avatar Nov 23 '24 13:11 ronibhakta1

@ronibhakta1 did your fix close this issue?

mekarpeles avatar Feb 18 '25 23:02 mekarpeles

@ronibhakta1 did your fix close this issue?

#10080 the fix i made and pushed the PR fix the issue, but i will connect with @scottbarnes on slack with this issue. that would be much helpfull before the merge.

ronibhakta1 avatar Feb 19 '25 08:02 ronibhakta1