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 ?