Skip to content

Commit

Permalink
fix: cli working in container post build
Browse files Browse the repository at this point in the history
the build was broken because the package wasn't being build
and installed in the container, this fixes the issue, we
must now refactor this to a two phase build to ensure
nothing we don't need gets left behind in the container

refs #33
  • Loading branch information
devraj committed Jul 30, 2024
1 parent a3cacf2 commit 9e10ce8
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,23 @@ RUN pip3 install poetry
RUN poetry config virtualenvs.create false
RUN poetry install --no-root

# Build and install the package
COPY gallagher gallagher
# README is reference by the package
COPY README.md README.md
RUN poetry build

# Install the package
RUN pip install dist/*.whl

# Remove the source
RUN rm -rf gallagher
RUN rm -rf dist
RUN rm README.md

# Copy the files in the src directory which is the app package
# and the dependency matrix dedescribed by pyproject.toml
WORKDIR /opt/${PROJ_NAME}
WORKDIR /opt/gallagher

# Run the CLI
ENTRYPOINT [ "gala" ]

0 comments on commit 9e10ce8

Please sign in to comment.