Skip to content

Instantly share code, notes, and snippets.

@projectoperations
Forked from 2tony2/Docker-compose.yml
Created May 7, 2024 00:15
Show Gist options
  • Save projectoperations/493bbdb2557928a82367cc99fd9cd528 to your computer and use it in GitHub Desktop.
Save projectoperations/493bbdb2557928a82367cc99fd9cd528 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