简体   繁体   中英

Access Denied error when running kompose up

I installed kompose using brew.

When I run kompose up I get

ERRO Unable to push image 'tolicodes/tolicodes.com:latest' to registry 'docker.io'. Error: errors:
denied: requested access to the resource is denied
unauthorized: authentication required

my ~/.docker/config.json looks like:

{
    "auths": {
        "https://index.docker.io/v1/": {}
    },
    "HttpHeaders": {
        "User-Agent": "Docker-Client/19.03.8 (darwin)"
    },
    "credsStore": "desktop",
    "experimental": "disabled",
    "stackOrchestrator": "swarm"
}

My docker-compose.yml

version: "3.4"
services:
  frontend-dev:
    build:
      context: .
      target: dev
    ports:
      - "3000:3000"
    volumes:
      - .:/app
      - /app/node_modules
    stdin_open: true
  frontend:
    build:
      context: .
      target: prod
    ports:
      - "80:80"
    image: tolicodes/tolicodes.com

I've successfully run docker login

I had to add the base64 encoded username/password to the config

echo -n 'username:password'  | base64

In ~/.docker/config.json

"auths": {
    "https://index.docker.io/v1/": {
      "auth": "<THE OUTPUT>"
    }
  },

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM