Created
August 26, 2020 06:12
-
-
Save invad0r/88d0727fc550c9f5c23fe2156776282e to your computer and use it in GitHub Desktop.
template Dockerfile for interactive use
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ARG TAG | |
FROM hashicorp/terraform:$TAG | |
RUN apk add --no-cache bash jq openssl graphviz docker python3 \ | |
&& python3 -m ensurepip \ | |
&& rm -r /usr/lib/python*/ensurepip \ | |
&& pip3 install --upgrade pip setuptools \ | |
&& if [ ! -e /usr/bin/pip ]; then ln -s pip3 /usr/bin/pip ; fi \ | |
&& if [[ ! -e /usr/bin/python ]]; then ln -sf /usr/bin/python3 /usr/bin/python; fi \ | |
&& rm -r /root/.cache \ | |
&& pip install 'docker-compose==1.23.2' \ | |
&& touch $HOME/.bashrc \ | |
&& terraform -install-autocomplete | |
WORKDIR /opt/terraform | |
ENV PS1="[\[\e[35m\]terraform ($(terraform workspace show))\[\e[m\]] \w \$ " | |
ENTRYPOINT ["bash"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment