Skip to content
This repository has been archived by the owner on May 26, 2023. It is now read-only.

docker: separate CLI and WEB building stages #389

Merged
merged 2 commits into from
May 6, 2020
Merged

Conversation

yxliang01
Copy link
Contributor

This addresses #383 and fixes #387 .

@yxliang01
Copy link
Contributor Author

Hi @anhdungle93 , as I don't have the environment at the moment, would you like to help me test this PR by docker build -t oyente --target CLI . ? If it works, I believe your issue is sort of resolved.

@anhdungle93
Copy link

@yxliang01 sorry for my late response. The command output the following error:

(oyente_env) ➜  oyente docker build -t oyente --target CLI .
Sending build context to Docker daemon  4.096kB
Error response from daemon: failed to reach build target CLI in Dockerfile

I tried to google and this may be the problem moby/moby#36956

@anhdungle93
Copy link

My bad, I didn't take the Dockerfile from the PR. I managed to build now but when I want to run the image I get

python3: can't open file '/oyente/oyente.py': [Errno 2] No such file or directory

@yxliang01
Copy link
Contributor Author

@anhdungle93 Fixed, if everything goes well, you should be able to use Oyente CLI in docker. Let me know how it goes. Thanks!

@anhdungle93
Copy link

@yxliang01 The path is stlll not correct

oyente docker run -it oyente
python3: can't open file 'oyente/oyente/oyente.py': [Errno 2] No such file or directory

@yxliang01
Copy link
Contributor Author

@anhdungle93 Hmm this is awkward. By the way, why your last error message doesn't have a leading / ? I have rechecked the committed file, it is a absolute path in branch.
Anyways, I think I will try to have an environment to test it out myself. Thanks for your help!

@anhdungle93
Copy link

anhdungle93 commented May 4, 2020

@yxliang01 thanks for the help. I tried to add the / too, but still got the same error

python3: can't open file '/oyente/oyente/oyente.py': [Errno 2] No such file or directory

@yxliang01
Copy link
Contributor Author

yxliang01 commented May 4, 2020

@anhdungle93 Thanks again. I will try to get a setup on my end, and fix accordingly later. If you wish to use Oyente CLI for now, please run docker run -it --entrypoint bash oyente then and manually locate the correct path of the oyente script (will also be helpful here if you have found it).

@anhdungle93
Copy link

@yxliang01 somehow the only thing in the folder oyente is the Dockerfile

/oyente# ls -a
.  ..  Dockerfile

@yxliang01
Copy link
Contributor Author

Hmm @anhdungle93 Then, I am afraid there might be some setup problem at your end. I suggest you try to freshly clone this codebase again and checkout the branch docker-improvement and perform the docker build again (without use of cache).

@anhdungle93
Copy link

@yxliang01
thanks a lot, I managed to run oyente on a smart contract but got

Error: Expected identifier, got 'LParen'

I suspect that oyente only supports old solidity version?

@yxliang01
Copy link
Contributor Author

@anhdungle93 Could you file a new issue with the contract used posted?

The officially supported version is 0.4.19 . If I remember correctly, I have successfully run over 0.4.24 or something.
Meanwhile, could you confirm that whether the current dockerfile can produce a runnable image?

@anhdungle93
Copy link

anhdungle93 commented May 6, 2020

@yxliang01 yes the dockerfile produced a runnable image, so we can close issue #388.

@yxliang01 yxliang01 merged commit ff62a44 into master May 6, 2020
@yxliang01 yxliang01 deleted the docker-improvement branch May 6, 2020 15:09
@yxliang01
Copy link
Contributor Author

Thank you @anhdungle93 again for your help in testing this PR!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

Successfully merging this pull request may close these issues.

docker: make building of web component optional
2 participants