Docker image for Gordon, based on the Lambda Docker Image
- Requires Docker to be installed and running 🐋 Docker Install
- Alias it to easily build and deploy using Lambda compatible Libc libraries (No more ELF errors)
- Ensure you have the AWS API env vars set for access key, secret key and default region - or use config files
$ docker pull danielwhatmuff/gordon
$ git clone git@github.com:danielwhatmuff/gordon-docker.git && cd gordon-docker && docker build -t gordon .
$ alias gordonshell='docker run -ti -e AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY -e AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID -e AWS_DEFAULT_REGION=$AWS_DEFAULT_REGION -v $(pwd):/var/task --rm gordon bash'
$ alias >> ~/.bash_profile
$ cd yourgordonproject
$ gordonshell
gordonshell> gordon build && gordon apply
- Example CLI config:-
[profile myprofile]
region = ap-southeast-2
role_arn = arn:aws:iam::ACCOUNTNUMBER:role/YourCrossAccountAssumableRole
- Mount the config into the container and set AWS_PROFILE
$ alias gordonshell='docker run -ti -e AWS_PROFILE=$AWS_PROFILE -e -v $(pwd):/var/task -v ~/.aws/:/root/.aws --rm gordon bash'
gordonshell> gordon build && gordon apply
- On Mac - if you leave the Docker daemon running for too long, you will get time drift and gordon commands may fail (so will AWS CLI commands) - to fix, just restart the daemon