Skip to content

Instantly share code, notes, and snippets.

@2tony2
Created February 24, 2024 15:46
Show Gist options
  • Save 2tony2/782bb3b8a3da39925f32c2c0aa7cf004 to your computer and use it in GitHub Desktop.
Save 2tony2/782bb3b8a3da39925f32c2c0aa7cf004 to your computer and use it in GitHub Desktop.
Example Docker Compose for DBT devcontainer
version: '3'
volumes:
local-dbt-env-shell-history: # This basically let's docker auto-manage this volume.
services:
local-dbt-env:
profiles:
- development
platform: linux/amd64 # We force the platform for consistency.
build:
context: .
dockerfile: Dockerfile
volumes:
- /var/run/docker.sock:/var/run/docker-host.sock # Forwards the local Docker socket to the container.
- local-dbt-env-shell-history:/commandhistory # Volume that stores shell history between sessions
# Overrides default command so things don't shut down after the process ends.
command: /bin/zsh -c "while sleep 1000; do :; done"
env_file: devcontainer.env
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment