Unable to build my docker image

I have a created a project as well as dockerfiles inside it. I’m trying to run it from docker but I keep getting this error

=> => transferring context: 34B                                                                                                                                                      0.0s
 => ERROR [internal] load metadata for docker.io/library/node:lts-alpine                                                                                                              1.5s
------
 > [internal] load metadata for docker.io/library/node:lts-alpine:
------
failed to solve with frontend dockerfile.v0: failed to create LLB definition: rpc error: code = Unknown desc = error getting credentials - err: exit status 255, out: ``
ERROR: Service 'bnis-prod-app' failed to build : Build failed

What is causing this error and how can I fix it? I’m still learning about docker. Also, please have a look at my Dockerfile and docker-compose file below

FROM node:lts-alpine

WORKDIR /app

ENV PATH /app/node_modules/.bin:$PATH

COPY package.json /app/package.json

RUN npm install

RUN npm install @vue/cli -g

CMD ["npm", "run", "serve"]
version: '3'

services:
  bnis-prod-app:
    container_name: bnis-prod-app
    build:
      context: .
      dockerfile: Dockerfile
    volumes:
      - '.:/app'
      - '/app/node_modules'
    ports:
      - '8080:8080'

The Dockerfile works for me. Can you build without buildkit? You can turn it off in the Docker desktop “Docker Engine” settings.

1 Like

I builts without buildkit, still same error @rimelek

#####Path
Docker → Settings → Docker Engine

Docker Engine
v20.10.17
{
  "builder": {
    "gc": {
      "defaultKeepStorage": "20GB",
      "enabled": true
    }
  },
  "experimental": false,
  "features": {
    "buildkit": false
  }
}

Works for me. Win10 WSL2 :+1: