honeytrap icon indicating copy to clipboard operation
honeytrap copied to clipboard

Build fail when compiling with lxc tag

Open giacomo270197 opened this issue 6 years ago • 8 comments

Hello, I am trying to build the docker container with the Dockerfile provided. It all works until I add the "lxc" flag. When I do, I get: director/lxc/lxc_linux.go:107:5: undefined: lxc.Container This is similar to #461, with the difference that my error occurs independently from the Go version I use (tried with 1.11.1-6, 1.12.1, latest), and it only happens if I try compiling with the lxc flag. Everything works otherwise. Any idea?

giacomo270197 avatar Apr 25 '19 12:04 giacomo270197

Hi, thanks for your comments. we are not supporting the lxc switch inside a docker container.

If you want to run Honeytrap with lxc in a container you can have a look at .travis file which builds a container with lxc support. Basically you need the lxc and lxc-dev` packages for the container OS.

sammynx avatar Apr 25 '19 13:04 sammynx

I see. The build command, however, fails also if I run it outside the Docker container

giacomo270197 avatar Apr 25 '19 13:04 giacomo270197

You also need the lxc and lxc-dev packages for the OS running inside the container.

I'm not sure if they exist for Alpine Linux. We use Ubuntu with the lxc packages from ppa:ubuntu-lxc/stable for testing.

sammynx avatar Apr 25 '19 13:04 sammynx

@giacomo270197 were you able to build Honeytrap with the lxc tag?

nl5887 avatar May 27 '19 19:05 nl5887

Hi, unfortunately, I wasn't. I did install lxc and lxc-dev on a Debian 9 OS. I currently gave up on using it for the project I was working for. I'll try again and follow up in a few weeks.

giacomo270197 avatar May 29 '19 06:05 giacomo270197

Hi,

I'm also having trouble on compiling with lxc tag and I'm not using containers. director/lxc/lxc_linux.go:107:5: undefined: lxc.Container

lconceicao avatar Jun 07 '19 15:06 lconceicao

The strange thing is, lxc builds are being checked within Travis: https://travis-ci.org/honeytrap/honeytrap/jobs/538895770#L1473. Compile checks isn’t failing. Do you have more information about the environment you’re using? @lconceicao

nl5887 avatar Jul 06 '19 19:07 nl5887

Hey,

Seems the problem hasn't been fixed so far. I am using lxc to compile and getting the same error.

# github.com/honeytrap/honeytrap/director/lxc
director/lxc/lxc_linux.go:107:5: undefined: lxc.Container

PS: I have tried above-suggested solutions and with go version 11.x.x, 12.x.x, 13.x.x, 14.x.x Would be really helpful if it can be fixed @nl5887 Also, why there is no support/guide for lxc container-based honeytrap in the official docs?

0xdeviner avatar Aug 05 '21 06:08 0xdeviner