Difference between tfenv custom image build compare with standard hashicorp image build

Hi All,

Could you able to assist me to find out the Difference between tfenv
custom image build compare with standard hashicorp image build.
i looked over google but wasn’t able to find any appropriate document,
so if you have any document which I can refer or any thing, that would
be really helpful.

Hi @rakesh0022,

tfenv is a third-party utility which is not published directly by HashiCorp, so I’m afraid I (as a HashiCorp staff member) don’t have enough context to know what you mean by “tfenv custom image build”.

Others in this forum might understand better what that refers to, but it might also help to say more about what you’re working on, what you’ve tried so far, what you learned, and what specific questions you have based on those observations. That will then give some more context for me or someone else here to understand what you are referring to and what kinds of answers would be useful for your goals.

Thanks!

Hi @apparentlymart

Thanks for the response. custom tfenv image means, i have build a Docker file, and content of the Docker file is below

FROM ubuntu:18.04

RUN apt-get update -y && \
    apt-get install -y git curl unzip

RUN git clone https://github.com/tfutils/tfenv.git ~/.tfenv && \
    ln -s /root/.tfenv/bin/* /usr/local/bin

ENV ALLOWED_TF_VERSIONS="0.14.3 1.1.4"

RUN for TF_VERSION in ${ALLOWED_TF_VERSIONS}; do tfenv install ${TF_VERSION}; done

ENTRYPOINT [ "tfenv" ]

and stanard terraform image - Docker Hub

so we have moved from standard hashicorp terraform image container to custom tfenv image container, and we are getting an error while installing software, as there is no sudo to install software using custom tfenv image container

so wanted to understand if `standard hashicorp terraform image is having some feature which does get included in tfenv image due to that we started getting error.

Hi @rakesh0022,

The hashicorp/terraform images on Docker hub have a relatively simple build process:

  1. Start from alpine:latest
  2. apk add --no-cache git openssh
  3. Copy the terraform executable from the corresponding release .zip file to /bin/terraform

Compared to the Dockerfile you shared, I suppose the most notable difference is that you start from Ubuntu whereas the official images start from Alpine Linux. Perhaps Ubuntu’s base images have a different sudoers configuration than the Alpine Linux base images do.

1 Like

Hi @apparentlymart,

I will look to research more in sudoers configuration between alipine linux andUbuntu`

Thanks for help @apparentlymart