Skip to content

Error in Dockerfile #2324

@pengbin2015

Description

@pengbin2015

When building the docker image by using the command "docker build -t langchain .", it will generate the error:

docker build -t langchain .
[+] Building 2.7s (8/12)
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 1.20kB 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 34B 0.0s
=> [internal] load metadata for docker.io/library/python:3.11.2-bullseye 2.3s
=> [internal] load build context 0.1s
=> => transferring context: 192.13kB 0.1s
=> [builder 1/5] FROM docker.io/library/python:3.11.2-bullseye@sha256:21ce92a075cf9c454a936f925e058b4d8fc0cfc7a05b9e877bed4687c51a565 0.0s
=> CACHED [builder 2/5] RUN echo "Python version:" && python --version && echo "" 0.0s
=> CACHED [builder 3/5] RUN echo "Installing Poetry..." && curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/maste 0.0s
=> ERROR [builder 4/5] RUN echo "Poetry version:" && poetry --version && echo "" 0.3s

[builder 4/5] RUN echo "Poetry version:" && poetry --version && echo "":
#7 0.253 Poetry version:
#7 0.253 /bin/sh: 1: poetry: not found


executor failed running [/bin/sh -c echo "Poetry version:" && poetry --version && echo ""]: exit code: 127

The reason why the poetry script is not working is that it does not have the execute permission. Therefore, the solution is to add the command chmod +x /root/.local/bin/poetry after installing Poetry. This command will grant execute permission to the poetry script, ensuring that it can be executed successfully.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions