Skip to content

Commit

Permalink
make ARG POETRY_HOME available in multistage (langchain-ai#3882)
Browse files Browse the repository at this point in the history
  • Loading branch information
whoissqr authored May 2, 2023
1 parent 188a7bd commit 8bbdde8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
# This is a Dockerfile for running unit tests

ARG POETRY_HOME=/opt/poetry

# Use the Python base image
FROM python:3.11.2-bullseye AS builder

# Define the version of Poetry to install (default is 1.4.2)
ARG POETRY_VERSION=1.4.2

# Define the directory to install Poetry to (default is /opt/poetry)
ARG POETRY_HOME=/opt/poetry
ARG POETRY_HOME

# Create a Python virtual environment for Poetry and install it
RUN python3 -m venv ${POETRY_HOME} && \
Expand All @@ -23,6 +25,8 @@ WORKDIR /app
# Use a multi-stage build to install dependencies
FROM builder AS dependencies

ARG POETRY_HOME

# Copy only the dependency files for installation
COPY pyproject.toml poetry.lock poetry.toml ./

Expand Down

0 comments on commit 8bbdde8

Please sign in to comment.