Sign inSign up

odyslam/ddapptools

By odyslam

Updated almost 4 years ago

Docker-dapptools: A drop-in docker replacement for dapptools.

Image
0

1.8K

odyslam/ddapptools repository overview

DDapptools, aka Docker-Dapptools A docker version of the 💊 of solidity development.

The repository for this container image lives on GitHub.

Instructions

The docker image is a drop-in replacement for dapptools.It's best to use the original dapptools and use the container image only if NIX is not playing nicely with your system.

In order for the container to function as a drop-in replacement, it must do 3 things:

  • Have access to the same env context as the dev machine
  • Have access to the files in the directory from which it's invoked
  • Use the same command without having to mess with docker internals

To satisfy all 3 requirements, I created ddapp.sh which is a helper script that manages everything for you.

Instead of running dapp or seth, you run ddapp.sh seth or ddapp.sh dapp and it's the same thing. With every invocation, it will do the following things:

  • Create a container from the odyslam/ddapptools image
  • Mount the $(pwd) directory to that container
  • Source the $(env) of the dev machine inside the container
  • Source the .env file of the current directory inside the container. (This might become more flexible in the future).
  • Delete the container after use

Disclaimer: You are advised to read the Dockerfile and all the scripts that come in the repository before running everything. It's better to assume a bad actor and do the extra work.

Example

If you use gakonst/dapptools-template as the basis for your project, simply:

  • Clone this repository (odyslam/ddapptools) to your dev machine. Let's say you clone it in ~/code/ddapptools.
  • ???
  • run ~/code/ddapptools/scripts/ddapp.sh make test
  • profit

You can now use dapptools without having to install them. Since the local directory is mounted inside the container, the Makefile is mounted as well. Inside the container, dapp is installed, thus no further change is required from us.

Tag summary

Content type

Image

Digest

sha256:2583a1767

Size

727.7 MB

Last updated

almost 4 years ago

docker pull odyslam/ddapptools