https://github.com/nickjer/docker-okta-awscli
Docker container that provides Okta authentication for AWS CLI
https://github.com/nickjer/docker-okta-awscli
Last synced: 4 months ago
JSON representation
Docker container that provides Okta authentication for AWS CLI
- Host: GitHub
- URL: https://github.com/nickjer/docker-okta-awscli
- Owner: nickjer
- License: mit
- Created: 2019-11-11T19:13:10.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-11-21T11:03:18.000Z (over 6 years ago)
- Last Synced: 2025-03-03T08:45:32.807Z (over 1 year ago)
- Language: Dockerfile
- Size: 2.93 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Docker - okta-awscli
[](https://hub.docker.com/repository/docker/nickjer/okta-awscli)
[](https://opensource.org/licenses/MIT)
Docker image for [okta-awscli](https://github.com/jmhale/okta-awscli) that
provides Okta authentication for [AWS CLI](https://aws.amazon.com/cli/).
## Getting Started
### Building with Docker
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:
```console
$ git clone https://github.com/nickjer/docker-okta-awscli.git
$ cd docker-okta-awscli
$ docker build --force-rm -t nickjer/docker-okta-awscli .
```
### Installing Docker Container
You can install it from [Docker Hub](https://hub.docker.com/) using:
```console
$ docker pull nickjer/docker-okta-awscli
```
## Usage
You can directly launch the `okta-awscli` command as:
```console
$ docker run --rm -it -v "$HOME:/data" nickjer/docker-okta-awscli
```
Note that the `` are any valid `okta-awscli` arguments.
### Helpful Shell Script
You can make a shell script that launches this as:
```bash
#!/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:
```console
$ ./my_script
...
$ AWS_PROFILE=my-aws-account ./my_script
...
$ OKTA_PROFILE=profile1 ./my_script --verbose
...
```