-
Notifications
You must be signed in to change notification settings - Fork 88
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
"git": executable file not found in $PATH #291
Comments
Docker builds probably are done via Dockerfile, we can fix that by updating - RUN apk add --no-cache ca-certificates
+ RUN apk add --no-cache ca-certificates git |
We can use a wrapper Dockerfile as a workaround FROM gochain/web3
RUN apk add --no-cache git # Build
docker build -t web3-git .
# Size
docker images -a | grep web3
web3-git latest 0a9e9c666a5f 44 seconds ago 58MB
gochain/web3 latest 88dded04d5cb 5 months ago 42MB
# Check
docker run -it --entrypoint /bin/sh web3-git -c "which git"
/usr/bin/git But there is an issue that web3 will clone repository into the local # Copy binary
docker run --rm \
-v ./web3-data:/app-data \
--entrypoint /bin/sh \
web3-git \
-c "cp /app/web3 /app-data"
# Generate contract
docker run --rm \
-v ./web3-data:/app \
web3-git \
generate contract erc20 --name "Test Tokens" --symbol TEST |
Looks like we can't build contract inside Docker image as we rely to Docker for that docker run --rm \
-v ./web3-data:/app \
web3-git \
contract build TEST.sol ERROR: Failed to compile "TEST_flatten.sol": solc: exec: "docker": executable file not found in $PATH |
To run those commands inside docker, we'd have to have a docker-in-docker build, which we don't have. Best to run it outside of docker if you can. |
I'm not so familiar with that, but can we create Docker images with solidity compiller? |
Ya, that's an option. |
I'm trying to follow the guide Generating Common Contracts using Docker image
docker run --rm \ -v ./web3-data:/data \ gochain/web3 \ generate contract erc20 --name "Test Tokens" --symbol TEST
But get the error
And we can check that git executable is missing in the Docker image
The text was updated successfully, but these errors were encountered: