Skip to content

deanillfeld/docker-terraform-utils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

docker-terraform-utils

A docker image that contains tools used to build and deploy Terraform modules.

  • terraform
  • terraform-docs
  • git-chglog
  • aws-cli

Examples

Makefile:

apply:
    docker-compose run --rm terraform-utils terraform apply

docker-compose:

services:
  terraform-utils:
    image: deanillfeld/docker-terraform-utils:latest
    volumes:
      - .:/code
      - ~/.aws:/root/.aws
      - ~/.ssh:/root/.ssh
    working_dir: /code

SELinux

If you have SELinux enabled volume mounts are a bit more complicated. You have 2 options to get around permission denied errors with docker-compose.

Option 1 - Use :Z to automatically relabel files
This will remove the existing label on files/directories which may break things

volumes:
      - ~/code:/code:Z
      - ~/.aws:/root/.aws:Z

Option 2 - Disable SELinux for the container

security_opt:
  - label:disable

Tests

DockerHub should automatically build and test on commit. Tests can be run locally with make test. Containers are not automatically cleaned up in the event of test failure. Run make clean when you are finished investigating the test failure.

About

Docker container for building and deploying terraform modules

Resources

License

Stars

Watchers

Forks

Packages

No packages published