Hi !

I need to check and fix some IP connection problems in an Azure IoT Edge Module. The module can’t see a specific IP:Port, so I decided to open the container bash and curl from there.

By default, curl is not installed in this docker image, so before using curl I need to also install it.

1st step is to connect to my container bash. The command is super simple:

#connect to the bash of running container
docker exec -it <container-id> bash

Then I can run a curl command, however, it’s not installed.

curl not installed in a container

I know, I can add curl as a prerequisite on the docker image definition. However, I will only use it once, so once I’m the container terminal I’ll install curl with the following command

apt-get update; apt-get install curl

And now, curl installed, so I can start to solve my IP problems.

run curl on a container

Happy coding!

Greetings

El Bruno

More posts in my blog ElBruno.com.

More info in https://beacons.ai/elbruno



¿Con ganas de ponerte al día?

En Lemoncode te ofrecemos formación online impartida por profesionales que se baten el cobre en consultoría:

Leave a comment

Discover more from El Bruno

Subscribe now to keep reading and get access to the full archive.

Continue reading