30
loading...
This website collects cookies to deliver better user experience
FROM mcr.microsoft.com/azure-cli
ENV TERRAFORM_VERSION 0.12.28
RUN apk add --update wget ca-certificates unzip git bash && \
wget -q -O /terraform.zip "https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_linux_amd64.zip" && \
unzip /terraform.zip -d /bin && \
apk del --purge wget ca-certificates unzip && \
rm -rf /var/cache/apk/* /terraform.zip
VOLUME ["/data"]
WORKDIR /data
RUN printf "\\nalias tf='terraform'" >> /root/.bashrc
ENTRYPOINT ["/bin/bash"]
FROM mcr.microsoft.com/azure-cli
ENV TERRAFORM_VERSION 0.12.28
RUN apk add --update wget ca-certificates unzip git bash && \
wget -q -O /terraform.zip "https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_linux_amd64.zip" && \
unzip /terraform.zip -d /bin && \
apk del --purge wget ca-certificates unzip && \
rm -rf /var/cache/apk/* /terraform.zip
VOLUME ["/data"]
WORKDIR /data
RUN printf "\\nalias tf='terraform'" >> /root/.bashrc
ENTRYPOINT ["/bin/bash"]
docker build . local/tf:12-28
docker run -it --rm -v ${PWD}:/data -v azure-cli:/root/.azure --name tf-inf local/tf:12-28
--rm
flag will remove the container afterwards. This is very useful due to a bug with WSL2/Docker that deletes the contents of the mount after a restart occasionally.