Where should I put the .pem file to connect to a EC2 instance via SSH from a containerized Airflow service?

Viewed 214

I am having trouble connecting to a EC2 instance from a dockerized puckel/Airflow service. I don't know where to save the pem file for the SSH connection to grab. How can I make the pem file avaialable for the containers?

Thanks.

1 Answers

As with any other file - you could copy the pem file to the container while building the docker image, or later by mounting a folder from the host.

For example: You could bind the host folder /home/myuser/keys to /root/keys. Then the contents of your host's folder will be accessible inside the docker container in /root/keys.

Bind Mounts in Docker

Related