orange-openSource--aws-terr.../automation/TFEnv/Dockerfile
Fabien Gaubert 5cf2ac0217 Init
2023-06-21 14:41:43 +02:00

32 lines
933 B
Docker

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