mirror of
https://github.com/AsgardEternal/Ubuntu-Ansible-Setup.git
synced 2024-09-28 08:14:23 -05:00
refactor(docker): improve docker image handling
This commit is contained in:
parent
a70d69a187
commit
bd65f96283
@ -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" ]
|
||||
|
Loading…
Reference in New Issue
Block a user