Skip to content

Fails to install Poetry when running docker-compose #18

Open

Description

@VigneshPT
Step 6/8 : RUN poetry install &&     bundler install
 ---> Running in da6a35f96e3d
/bin/sh: poetry: not found
ERROR: Service 'web' failed to build: The command '/bin/sh -c poetry install &&     bundler install' returned a non-zero code: 127

This is the error I get when I run docker-compose up -d

Activity

  1. cosmologist10 commented on Mar 5, 2019

    @cosmologist10

    I solved this bug, and website is running successfully in my browser, but the main features like pin, follow is incomplete.

  2. arakhshan commented on Jul 10, 2019

    @arakhshan

    I solved this bug, and website is running successfully in my browser, but the main features like pin, follow is incomplete.

    Can you please share your solution. I just faced the same issue.

  3. mohsen74 commented on Aug 15, 2019

    @mohsen74

    I solved the problem with changing DockerFile to:

    FROM python:2.7
    
    ENV LIBRARY_PATH=/lib:/usr/lib
    
    WORKDIR /stream
    
    ADD . /stream
    
    RUN apt update
    RUN apt install -y python-pip
    RUN pip install poetry==0.8.1
    RUN  poetry install
    
    EXPOSE 8000
    CMD ["poetry", "run", "python", "manage.py", "runserver", "0.0.0.0:8000"]
    
  4. chusteven commented on Jan 13, 2022

    @chusteven

    In case it helps anyone years later 😅 I kept the same base image but amended just a couple of lines below. Looks like py2-anyjson support was dropped from alpine here and then the poetry stuff I guess was ripped off from above :D

    RUN apk add --no-cache --repository http://dl-3.alpinelinux.org/alpine/edge/testing/ \
    -    git zlib-dev jpeg-dev gcc musl-dev postgresql-dev py2-anyjson ruby-bundler py2-pip libjpeg curl && \
    +    git py-pip zlib-dev jpeg-dev gcc musl-dev postgresql-dev py-anyjson ruby-bundler py2-pip libjpeg curl && \
         curl -sSL https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py | python
    
     WORKDIR /stream
    
     ADD . /stream
    
    +RUN pip install poetry==0.8.1
     RUN poetry install && \
         bundler install
    
     EXPOSE 8000
    
    -CMD ["poetry", "run", "python", "manage.py", "runserver", "0.0.0.0:8000"]
    +CMD ["poetry", "run", "python", "manage.py", "runserver", "0.0.0.0:8000"]
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions