failed to solve: python:3.13.0a5: error getting credentials - err: exit status 127 - Docker

48 views Asked by At

I am using the docker in the WSL- ubuntu, where I am trying to build a Dockerfile, the problem is that the docker-compose cmd throws the following error:

Command I ran,

# This throws the following error
docker-compose up --build

Error

failed to solve: python:3.13.0a5: error getting credentials - err: exit status 127

But the same Dockerfile is being built successfully when I use the docker build cmd

# This works
docker build -t my_image_name .

but I see this error at the start while, but it continues and finishes successfully at the end.


docker-credential-secretservice: error while loading shared libraries: libsecret-1.so.0: cannot open shared object file: No such file or directory

I am not sure whether this issue causing the docker-compose to fail.

docker-compose.yml

version: '3'
services:
  api:
    build:
      context: .
      dockerfile: app/Dockerfile
    image: my-api
    environment:
    - AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}
    - AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}
    volumes:
    - "~/.aws:/root/.aws:ro"
    ports:
    - "5001:5001"

Dockerfile

FROM python:3.13.0a5

WORKDIR /code

COPY ./requirements.txt /code/requirements.txt

RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt

COPY ./app /code/app

CMD uvicorn app.main:app --host 0.0.0.0 --port 5001

My Environment details:

  1. Primary OS : Windows
  2. Using Rancher Desktop
  3. Running the cmd's inside the WSL-ubuntu

I tried various solutions suggested by other answers posted in the stackoverflow and docker forums, but none of them resolved my issue.

0

There are 0 answers