#docker 🐳 – Install apps on a running container. This time, curl 💪

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.



¿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

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: