Skip to content

Commit

Permalink
Move galaxy role install from builder to final image
Browse files Browse the repository at this point in the history
  • Loading branch information
aabaris committed Sep 5, 2024
1 parent 799c298 commit 8e7dd78
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ COPY galaxy-requirements.yaml /srv/ansible/galaxy-requirements.yaml

RUN python3 -m venv /srv/docker-ansible/env && \
/srv/docker-ansible/env/bin/pip install -r /srv/docker-ansible/requirements.txt
RUN /srv/docker-ansible/env/bin/ansible-galaxy install -r /srv/ansible/galaxy-requirements.yaml

# Final Image

Expand All @@ -34,6 +33,8 @@ COPY --from=builder /srv/docker-ansible /srv/docker-ansible

COPY lint.sh /srv/docker-ansible/env/bin/lint.sh

RUN /srv/docker-ansible/env/bin/ansible-galaxy install -r /srv/ansible/galaxy-requirements.yaml

ENTRYPOINT []

CMD ["/srv/docker-ansible/env/bin/ansible-playbook"]

0 comments on commit 8e7dd78

Please sign in to comment.