Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: Docker container #136

Open
pregress opened this issue Dec 11, 2024 · 1 comment
Open

Feat: Docker container #136

pregress opened this issue Dec 11, 2024 · 1 comment

Comments

@pregress
Copy link

pregress commented Dec 11, 2024

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" ]
@bitgandtter
Copy link

bitgandtter commented 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" ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants