skip to Main Content

I’m facing issue with my new Mac wit M1 Chip.
I use the same config as on my old mac where it worked:

version: '3'

services:
  shop:
    container_name: shop
    image: dockware/dev:latest
    ports:
      - "22:22"     # ssh
      - "80:80"     # apache2
      - "443:443"   # apache2 https
      - "8888:8888" # watch admin
      - "9998:9998" # watch storefront proxy
      - "9999:9999" # watch storefront
      - "3306:3306" # mysql port
    volumes:
      - "db_volume:/var/lib/mysql"
      - "shop_volume:/var/www/html"
    networks:
      - web
    environment:
      - MYSQL_USER=shopware
      - MYSQL_PWD=secret
      - XDEBUG_ENABLED=0

  rediscache:
    image: redis:6.0
    container_name: redis
    networks:
      - web

volumes:
  db_volume:
    driver: local
  shop_volume:
    driver: local

## ***********************************************************************
##  NETWORKS
## ***********************************************************************
networks:
  web:
    external: false

The error i get is :

sudo: no tty present and no askpass program specified

I already pruned image and containers but still get this error.

On my research, i found solutions where i need to edit sudoer file or set permission, but it’s docker image, so I can not use those solutions.

Anyone an idea why and how to solve that?

2

Answers


  1. Please open a shell in the container (docker exec -it <container name> /bin/bash) and execute the entrypoint script manually.

    You should see that prompt when running it manually.

    Probably the setup or so is trying to ask for something interactively, which fails if there is no TTY.

    Login or Signup to reply.
  2. For same problem in my case macOS with M2, I fixed it passing a user param with value root or 0.
    For example

    docker run -p 80:80 -u root --name shopwarelocal dockware/dev:latest
    
    or
    
    docker run -p 80:80 -u 0 --name shopwarelocal dockware/dev:latest
    

    For Docker compose

    ....
    services:
      shopware:
        user: 'root'
        container_name: shopware
        image: dockware/dev:6.5.0.0
    ....
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search