我正在尝试使用 docker-compose up 构建一个 docker 文件,但出现错误:
/bin/sh: 1: poetry: not found
ERROR: Service 'web' failed to build: The command '/bin/sh -c poetry install && bundler install' returned a non-zero code: 127
这是我的 docker 文件和 docker-compose-yml 文件: dockerfile:
FROM python:2.7
ENV LIBRARY_PATH=/lib:/usr/lib
RUN curl -sSL https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py | python
WORKDIR /stream
ADD . /stream
CMD ["cat", "/etc/os-release"]
RUN poetry install && \
bundler install
EXPOSE 8000
CMD ["poetry", "run", "python", "manage.py", "runserver", "0.0.0.0:8000"]
码头工人撰写:
version: '3'
services:
redis:
image: redis
ports:
- 6379
web:
build: .
ports:
- 8000:8000
environment:
- REDISTOGO_URL=redis://redis:6379
depends_on:
- redis