Skip to content

Commit

Permalink
added terraform plugin cache
Browse files Browse the repository at this point in the history
  • Loading branch information
paulrobello committed Feb 9, 2024
1 parent 42c6e4f commit 0300f4d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
6 changes: 5 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ services:
- PROXY_URL # http proxy to use. if USE_PROXY_HOST is enabled will be set to http://PROXY_CONTAINER_NAME:8080
- PROXY_URL_SSL # https proxy to use. if USE_PROXY_HOST is enabled will be set to https://PROXY_CONTAINER_NAME:8080
- PROXY_AUTO_EXPORT_ENV # auto export HTTP_PROXY and HTTPS_PROXY vars equal to PROXY_URL
- DEV_CONTAINER=1.10.6 # used to detect if running inside dev container
- DEV_CONTAINER=1.10.7 # used to detect if running inside dev container
volumes:
- /var/run/docker.sock:/var/run/docker.sock # allow container to interact with host docker
- "${GDC_DIR}:/root/gdc-host" # mount gdc folder inside container to get access to compose files
Expand All @@ -130,13 +130,17 @@ services:
- shared:/root/shared # persisted and shared between stacks / containers
- package_cache:/usr/local/share/.cache # persist npm, yarn and pip cache for faster rebuilds
- pulumi:/root/.pulumi # persist pulumi plugin install
- terraform:/root/.terraform_plugin_cache # persist terraform plugin install
- cache:/root/.cache # persist caches in ~/.cache folder
- home_config:/root/.config # persist data for various apps such as bitwarden

volumes:
bash_history: # persist bash history
persisted: # put things you want to persist between container rebuilds here
cache: # .cache folder in home dir
terraform: # persist terraform plugin install across all stacks
name: terraform
external: true
pulumi:
name: pulumi # persist pulumi plugin install across all stacks
external: true
Expand Down
1 change: 1 addition & 0 deletions etc/skel/.terraformrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
plugin_cache_dir = "$HOME/.terraform_plugin_cache"
2 changes: 1 addition & 1 deletion run-dev-container.sh
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ export DEVNET_SUBNET
export LOCALSTACK_STATIC_IP


CACHE_VOLUMES_REQUIRED="pulumi pkg_cache"
CACHE_VOLUMES_REQUIRED="pulumi pkg_cache terraform"
SHARED_VOLUMES_REQUIRED="shared home_config"

SHARED_VOLUMES="$SHARED_VOLUMES_REQUIRED $CACHE_VOLUMES_REQUIRED"
Expand Down

0 comments on commit 0300f4d

Please sign in to comment.