Docker container that provides Okta authentication for AWS CLI
293
Docker image for okta-awscli that provides Okta authentication for AWS CLI.
If you do not want to build this Docker image then feel free to skip to the Installation section. Otherwise you can build this image with the following commands:
$ git clone https://github.com/nickjer/docker-okta-awscli.git
$ cd docker-okta-awscli
$ docker build --force-rm -t nickjer/docker-okta-awscli .
You can install it from Docker Hub using:
$ docker pull nickjer/docker-okta-awscli
You can directly launch the okta-awscli command as:
$ docker run --rm -it -v "$HOME:/data" nickjer/docker-okta-awscli <args>
Note that the <args> are any valid okta-awscli arguments.
You can make a shell script that launches this as:
#!/usr/bin/env bash
AWS_PROFILE="${AWS_PROFILE:-default}"
OKTA_PROFILE="${OKTA_PROFILE:-${AWS_PROFILE}}"
#OKTA_PROFILE="${OKTA_PROFILE:-default}"
exec \
docker run --rm -it -v "$HOME:/data" nickjer/docker-okta-awscli \
--okta-profile "${OKTA_PROFILE}" \
--profile "${AWS_PROFILE}" \
"${@}"
Then you can run it as:
$ ./my_script
...
$ AWS_PROFILE=my-aws-account ./my_script
...
$ OKTA_PROFILE=profile1 ./my_script --verbose
...
Content type
Image
Digest
Size
45.5 MB
Last updated
almost 7 years ago
docker pull nickjer/okta-awscli