orange-openSource--aws-terr.../automation/TFEnv/Dockerfile

33 lines
933 B
Text
Raw Permalink Normal View History

2023-06-21 12:41:43 +00:00
ARG BASH_VERSION
FROM "docker.io/bash:${BASH_VERSION}"
# Runtime dependencies
RUN apk add --no-cache --purge \
curl \
python3 py3-pip \
git \
wget \
;
ARG TFENV_VERSION
RUN wget -O /tmp/tfenv.tar.gz "https://github.com/tfutils/tfenv/archive/refs/tags/v${TFENV_VERSION}.tar.gz" \
&& tar -C /tmp -xf /tmp/tfenv.tar.gz \
&& mv "/tmp/tfenv-${TFENV_VERSION}/bin"/* /usr/local/bin/ \
&& mkdir -p /usr/local/lib/tfenv \
&& mv "/tmp/tfenv-${TFENV_VERSION}/lib" /usr/local/lib/tfenv/ \
&& mv "/tmp/tfenv-${TFENV_VERSION}/libexec" /usr/local/lib/tfenv/ \
&& mkdir -p /usr/local/share/licenses \
&& mv "/tmp/tfenv-${TFENV_VERSION}/LICENSE" /usr/local/share/licenses/tfenv \
&& rm -rf /tmp/tfenv* \
&& mkdir /var/tfenv \
&& chmod 777 /var/tfenv \
;
ENV TFENV_ROOT /usr/local/lib/tfenv
ENV TFENV_CONFIG_DIR /var/tfenv
VOLUME /var/tfenv
ENTRYPOINT ["/usr/local/bin/terraform"]