Apt-get not found in circleci pipeline (ubuntu)

Objective: Trying to get public ip of machine via circleci pipeline
Code I use:

version: 2.1
orbs:
  jq: circleci/jq@2.2.0
executors:
  my-executor-terraform:
    docker:
      - image: docker.mirror.hashicorp.services/hashicorp/terraform:light
    working_directory: /home/circleci/workingfile
jobs:
  findpublicip:
    executor: my-executor-terraform
    steps:
      - checkout
      - run:
          name: get ip to add to azure storage account
          command: |
             apt-get install -y sudo
             sudo apt-get install curl
             ip=$(curl ifconfig.me)
             echo $ip
workflows:
  example-workflow:
    jobs:
      - findpublicip

Error I get::

#!/bin/sh -eo pipefail
apt-get install -y sudo
sudo apt-get install curl
ip=$(curl ifconfig.me)
echo $ip

/bin/sh: apt-get: not found

Exited with code exit status 127
CircleCI received exit code 127

VM that circleci uses:

Can you please help to find is missing here ?

You are using a container image provided by hashicorp as your execution environment, so you are limited by the support they have included for commands like apt-get.

Circleci provides details on the images they offer at this link

  https://circleci.com/docs/circleci-images

Oh wow, great clue, now i need to use apk command to add curl and try…
I am trying now.

The first thing to try would be to replace “apt-get” with “apk add” as it is not clear what distro you are working with so you may as well try the other often used command for adding a package.