Skip to content
This repository has been archived by the owner on Feb 7, 2022. It is now read-only.

Docker in docker problem #170

Open
iris-garcia opened this issue Sep 7, 2019 · 3 comments
Open

Docker in docker problem #170

iris-garcia opened this issue Sep 7, 2019 · 3 comments

Comments

@iris-garcia
Copy link

Hi,

I am facing an issue when I try to cross compile using this package in a docker in docker setup.
Basically there is a jenkins container (which has access to the docker.sock) and can spawn new containers, but when I try to cross compile it fails:

Checking docker installation...
Client:
 Version:      17.05.0-ce
 API version:  1.29
 Go version:   go1.7.5
 Git commit:   89658be
 Built:        Thu May  4 22:09:06 2017
 OS/Arch:      linux/amd64

Server:
 Version:      19.03.2
 API version:  1.40 (minimum version 1.12)
 Go version:   go1.12.8
 Git commit:   6a30dfc
 Built:        Thu Aug 29 05:27:45 2019
 OS/Arch:      linux/amd64
 Experimental: false

Checking for required docker image karalabe/xgo-latest... found.
Cross compiling github.com/ethereum/go-ethereum/cmd/geth...
Building locally github.com/ethereum/go-ethereum/cmd/geth...
Compiling for linux/amd64...
can't load package: package .: no Go files in /root
2019/09/07 14:03:39 Failed to cross compile package: exit status 1.

Is there a way to run xgo from a docker container?

Thanks.

@shiqinfeng1
Copy link

Hi,@iris-garcia,could this problem be resolved? I encountered the same problem.

@iris-garcia
Copy link
Author

Hi @shiqinfeng1, yes the way I solved it was using the following docker image in the jenkins agent:

docker {
		    image 'techknowlogick/xgo:latest'
		    args '-u root:root --entrypoint=\'\''
		}

Then inside this container xgo runs fine (without the need of spawning another container).

@huapox
Copy link

huapox commented Dec 25, 2020

+1

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

No branches or pull requests

3 participants