Skip to content

Instantly share code, notes, and snippets.

@michaelsproul
Last active March 25, 2022 04:10
Show Gist options
  • Save michaelsproul/69a7a49b80fdf3cc4361e3015ba7ead7 to your computer and use it in GitHub Desktop.
Save michaelsproul/69a7a49b80fdf3cc4361e3015ba7ead7 to your computer and use it in GitHub Desktop.
Run Ganache in Docker transparently so that it appears to be running on the host
#!/usr/bin/env fish
# - Use exec so that the parent can signal `docker run` directly.
# - Proxy signals from `docker run` to the container, allowing it to terminate gracefully.
# - Use host networking so that Lighthouse tests which expect to fork from localhost continue
# to work.
exec docker run -i --sig-proxy=true --network=host trufflesuite/ganache:latest $argv[1..-1]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment