Containerized AWS CLI on Centos7. Support SSH remote
393
Containerized AWS CLI on Centos7. Support SSH remote
docker build -t luanvv/aws-cli .
luanvv/aws-cli : Docker image name
docker run -d --name awscli -p 22 luanvv/aws-cli
-d : run in background
--name aws-cli : container's name
-p 22 : map localhost port with container port 22
luanvv/aws-cli : Docker image name
Check SSH Port
docker port awscli
Output example:
22/tcp -> 0.0.0.0:32770
I don't want expose any security credentials. So, instead of export AWS Credentials via environment variables, you should connect to Docker container and configure by hand.
Connect direct from docker container:
docker exec -it awscli bash
Or SSH
ssh -p <container_port> user@localhost
password default is newpass
Config AWS credentials
aws configure
Content type
Image
Digest
Size
333.7 MB
Last updated
almost 7 years ago
docker pull luanvv/awscli