pypicloud-docker icon indicating copy to clipboard operation
pypicloud-docker copied to clipboard

Compose `sh: 1: /wait-for: not found`

Open KerberosMorphy opened this issue 4 years ago • 1 comments

For an unknow reason, if I clone this repo, and execute the following command without any change:

> cd /compose
> docker-compose -f mysql.yml up

I got the following error:

pypicloud_1  | sh: 1: /wait-for: not found
pypicloud_1 exited with code 127

I've try a lot of things to make it works, I end up using restart: on-failure to skip the wait-for.

Here my final setup:

services:
  pypicloud:
    command: uwsgi --die-on-term /etc/pypicloud/config.ini
    restart: on-failure
    depends_on:
      - mysql
    image: stevearc/pypicloud:1.3.1
    ports:
      - "8080:8080"
    env_file:
      - base_config.env
      - file_storage_config.env
      - sql_cache_config.env
      - sql_auth_config.env
      - beaker_config.env
  mysql:
    image: mysql
    environment:
      MYSQL_DATABASE: pypi
      MYSQL_ALLOW_EMPTY_PASSWORD: 'yes'

Did someone know why the wait-for isn't working and how to make it works?

The weirdest part is while using:

services:
  pypicloud:
    command: ls -lah /wait-for

It did found it:

compose-pypicloud-1  | -rwxrwxrwx 1 root root 2.8K Oct 13 14:42 /wait-for

KerberosMorphy avatar Oct 13 '21 16:10 KerberosMorphy

Unfortunately I have no idea why this would be failing. I just tried it again and those exact commands work fine on my machine (Ubuntu 20.04, Docker version 20.10.9, docker-compose version 1.29.2). I would recommend trying to get a minimal repro, perhaps with a base ubuntu image or without using docker-compose at all. Then you can report the issue to docker or docker-compose, depending on where the problem seems to originate.

stevearc avatar Oct 13 '21 22:10 stevearc