[GH-ISSUE #136] Feat: Docker container #77

Closed
opened 2026-05-06 12:37:09 +02:00 by BreizhHardware · 2 comments

Originally created by @pregress on GitHub (Dec 11, 2024).
Original GitHub issue: https://github.com/patrickchugh/terravision/issues/136

Support to run terravision from a docker image so I don't have to install all dependencies.
Sample, that's not working atm.

FROM hashicorp/terraform:1.10.1

# Install python/pip
RUN apk add --no-cache python3 py3-pip
RUN rm /usr/lib/python*/EXTERNALLY-MANAGED && \
    python3 -m ensurepip

# Install graphviz
RUN apk add --update --no-cache graphviz

ADD ./ /terrafvision

RUN export PATH=$PATH:/terrafvision


WORKDIR /terrafvision
RUN pip install -r requirements.txt
RUN chmod +x terravision

ENTRYPOINT [ "/bin/sh" ]
Originally created by @pregress on GitHub (Dec 11, 2024). Original GitHub issue: https://github.com/patrickchugh/terravision/issues/136 Support to run terravision from a docker image so I don't have to install all dependencies. Sample, that's not working atm. ```dockerfile FROM hashicorp/terraform:1.10.1 # Install python/pip RUN apk add --no-cache python3 py3-pip RUN rm /usr/lib/python*/EXTERNALLY-MANAGED && \ python3 -m ensurepip # Install graphviz RUN apk add --update --no-cache graphviz ADD ./ /terrafvision RUN export PATH=$PATH:/terrafvision WORKDIR /terrafvision RUN pip install -r requirements.txt RUN chmod +x terravision ENTRYPOINT [ "/bin/sh" ] ```
Author
Owner

@bitgandtter commented on GitHub (Jan 23, 2025):

i made it work with

FROM hashicorp/terraform:1.10

RUN <<EOF
apk update
apk add --no-cache python3 py3-pip bash
rm /usr/lib/python*/EXTERNALLY-MANAGED
python3 -m ensurepip
apk add --update --no-cache graphviz
git clone https://github.com/patrickchugh/terravision.git
export PATH=$PATH:/terravision
pip install -r requirements.txt
chmod +x terravision
EOF

WORKDIR /app

ENTRYPOINT [ "terravision" ]
<!-- gh-comment-id:2609948618 --> @bitgandtter commented on GitHub (Jan 23, 2025): i made it work with ``` FROM hashicorp/terraform:1.10 RUN <<EOF apk update apk add --no-cache python3 py3-pip bash rm /usr/lib/python*/EXTERNALLY-MANAGED python3 -m ensurepip apk add --update --no-cache graphviz git clone https://github.com/patrickchugh/terravision.git export PATH=$PATH:/terravision pip install -r requirements.txt chmod +x terravision EOF WORKDIR /app ENTRYPOINT [ "terravision" ] ```
Author
Owner

@patrickchugh commented on GitHub (Dec 16, 2025):

Already in patrickchugh/terravision#

<!-- gh-comment-id:3662732199 --> @patrickchugh commented on GitHub (Dec 16, 2025): Already in [patrickchugh/terravision#](https://github.com/patrickchugh/terravision/pull/138)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/terravision#77
No description provided.