Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: docker image #127

Closed
sabotagebeats opened this issue Aug 18, 2021 · 8 comments
Closed

feat: docker image #127

sabotagebeats opened this issue Aug 18, 2021 · 8 comments
Labels
category: feature New feature or request

Comments

@sabotagebeats
Copy link
Contributor

Overview

  • What you are trying to do: docker image for ape
  • Why Ape's current functionality is inadequate to address your goal: needs better docker image for compatibility with docker and easier setup and containerization

Specification

This should be a docker image which has all the apeworx plugins installed and ready to go.

Dependencies

This should be able to do on linux but more difficult on windows because an issue with dependency: #91

@sabotagebeats sabotagebeats added the category: feature New feature or request label Aug 18, 2021
@fubuloubu
Copy link
Member

@sabotagebeats note that using the Docker image in windows doesn't mean the base needs to be windows, it can be a linux base

@sabotagebeats
Copy link
Contributor Author

@fubuloubu
Copy link
Member

https://hub.docker.com/layers/apeworx/eth-ape-docker/0.1.0a22/

Awesome! Can the image just be ape though?

@sabotagebeats
Copy link
Contributor Author

https://hub.docker.com/layers/apeworx/eth-ape-docker/0.1.0a22/

Awesome! Can the image just be ape though?

I've made it just be ape but i'm having an issue getting it to compile solidity.

@sabotagebeats
Copy link
Contributor Author

(brownie) sabotage@sabotage:~/ape/token$ docker run --volume $HOME/.ape:/root/ape --volume $HOME/.vvm:/root/.vvm --volume $HOME/.solcx:/root/.solcx --volume $PWD:/root/project --workdir /root/project apeworx/ape ape compile
INFO: Compiling 'contracts/Token.sol'
INFO: Compiling 'contracts/SafeMath.sol'
Traceback (most recent call last):
  File "/usr/local/bin/ape", line 8, in <module>
    sys.exit(cli())
  File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1137, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1062, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1668, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 763, in invoke
    return __callback(*args, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/ape_compile/_cli.py", line 75, in cli
    contract_types = project.load_contracts(use_cache)
  File "/usr/local/lib/python3.8/dist-packages/ape/managers/project.py", line 117, in load_contracts
    contract_types.update(self.compilers.compile(list(needs_compiling)))
  File "/usr/local/lib/python3.8/dist-packages/ape/managers/compilers.py", line 49, in compile
    for contract_type in self.registered_compilers[extension].compile(paths_to_compile):
  File "/usr/local/lib/python3.8/dist-packages/ape_solidity/compiler.py", line 77, in compile
    for result in solcx.compile_source(
  File "/usr/local/lib/python3.8/dist-packages/solcx/main.py", line 112, in compile_source
    return _compile_combined_json(
  File "/usr/local/lib/python3.8/dist-packages/solcx/main.py", line 288, in _compile_combined_json
    stdoutdata, stderrdata, command, proc = wrapper.solc_wrapper(
  File "/usr/local/lib/python3.8/dist-packages/solcx/wrapper.py", line 158, in solc_wrapper
    raise SolcError(
solcx.exceptions.SolcError: An error occurred during execution
> command: `/root/.solcx/solc-v0.6.12 --combined-json abi,bin,bin-runtime,devdoc,userdoc -`
> return code: `1`
> stdout:

> stderr:
Error: Source "SafeMath.sol" not found: File not found.
 --> <stdin>:5:1:
  |
5 | import "./SafeMath.sol";
  | ^^^^^^^^^^^^^^^^^^^^^^^^

@fubuloubu
Copy link
Member

oh weird, so the solidity binary is not finding the local referenced file?

@sabotagebeats
Copy link
Contributor Author

sabotagebeats commented Sep 17, 2021

this bug has been resolved in new version of ape-solidity.

https://hub.docker.com/layers/apeworx/eth-ape-docker/0.1.0a23/

@sabotagebeats
Copy link
Contributor Author

#165

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: feature New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants