refactor(docker): improve docker image handling

This commit is contained in:
Price Hiller 2024-07-17 03:29:07 -05:00
parent a70d69a187
commit bd65f96283
Signed by: Price
GPG Key ID: C3FADDE7A8534BEB

View File

@ -18,7 +18,7 @@ ENV PIP_DEFAULT_TIMEOUT=100 \
RUN pip install "poetry"
COPY pyproject.toml poetry.lock ./
COPY pyproject.toml poetry.lock requirements.yml ./
RUN <<__EOR__
apk add --no-cache build-base
@ -27,6 +27,7 @@ pip --version
poetry config virtualenvs.in-project true
poetry lock
poetry install --only=main,dev --no-root --no-ansi --no-interaction
poetry run ansible-galaxy install -r requirements.yml
__EOR__
FROM base as final
@ -43,8 +44,4 @@ COPY --from=build /app/.venv ./.venv
COPY . .
ENV PATH="${PATH}:/app/.venv/bin"
RUN <<__EOR__
ansible-galaxy install -r requirements.yml
__EOR__
ENTRYPOINT [ "/bin/sh" ]