solo-io / unik

The Unikernel & MicroVM Compilation and Deployment Platform
Apache License 2.0
2.72k stars 191 forks source link

make binary fails #82

Closed loeweh closed 8 years ago

loeweh commented 8 years ago

Hi Unik,

when trying to make the unik binary (even as root) I get the error:

github.com/emc-advanced-dev/unik/cmd github.com/emc-advanced-dev/unik mv: cannot create regular file '/opt/build/unik': Permission denied Makefile:253: recipe for target 'binary' failed make: *\ [binary] Error 1

I did a mkdir -p /opt/build

Any ideas?

Regards

Heiko

ilackarms commented 8 years ago

when you run make binary, here's what's happening:

  1. unik runs docker build on the Dockerfile that's in the root of the unik project. this copies everything in the unik directory into a docker container that has go jq make and go-bindata installed.
  2. an instance of the container is run with the argument -v _build/:/opt/build, which means the local <unik_project_dir>/_build directory will be mapped to /opt/build inside the container
  3. go build runs inside the container
  4. the resulting binary is copied from inside the container to /opt/build which should place it on the host in _build.

the step that is failing is #4. it may be that the docker daemon doesn't have permission to create files in the _build directory. Can you try to manually create _build (inside the root unik directory) and chmod a+w to it?

loeweh commented 8 years ago

Hi ilackarms, got the problem: selinux. after $ sudo setenfrorce 0 it worked :-).

Regards

Heiko