Skip to content
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

Docker build necessary ? #23

Closed
Clovel opened this issue Jan 14, 2020 · 7 comments
Closed

Docker build necessary ? #23

Clovel opened this issue Jan 14, 2020 · 7 comments
Assignees

Comments

@Clovel
Copy link
Contributor

Clovel commented Jan 14, 2020

Why exactly do we need to run make in a docker container. Of course I understand the benefits of doing so, but shouldn't it be an option when running make for the first time ? Something like make DOCKER_BUILD=y or so ?

@pgravel-com
Copy link
Contributor

pgravel-com commented Jan 14, 2020

No, it is not necessary and adding a flag should be fairly trivial. Taking a look at it.

@Clovel
Copy link
Contributor Author

Clovel commented Jan 15, 2020

Ok @pgravel-com. I was thinking of that because of cases where some people can't use Docker (VT-x deactivated by IT dept., WSL, etc) but still want to compile and contribute.

@leonrinkel
Copy link
Contributor

Building without Docker is already possible by running something like make -f Build/Makefile instead of using the default root-level Makefile. A flag would make that even clearer.

@Clovel
Copy link
Contributor Author

Clovel commented Jan 20, 2020

Building without Docker is already possible by running something like make -f Build/Makefile instead of using the default root-level Makefile. A flag would make that even clearer.

Exactly my point. I (or someone else) should look to implement this.

@rojer
Copy link
Contributor

rojer commented Jan 20, 2020

i don't really understand the rpoblem...
i'm using something like make apps && Output/Linux-x86_64-pc-linux-gnu/Debug/IP/Applications/Lightbulb.OpenSSL and it just works for me on ubuntu.
with all the dependencies installed, of course.

@aajain-com
Copy link
Contributor

Like @rojer said, if make is being run inside a plain posix environment then you don't need docker at all. Reference: https://github.com/apple/HomeKitADK/blob/master/Makefile#L39-L4. The code ifneq (,$(wildcard /.dockerenv)) already makes sure of that.

@Clovel
Copy link
Contributor Author

Clovel commented Jan 22, 2020

Like @rojer said, if make is being run inside a plain posix environment then you don't need docker at all. Reference: https://github.com/apple/HomeKitADK/blob/master/Makefile#L39-L4. The code ifneq (,$(wildcard /.dockerenv)) already makes sure of that.

I do not have that experience. On a Linux system that doesn't have docker, I get :

$ make apps
/bin/sh: 1: docker: not found
/bin/sh: 1: docker: not found
Makefile:58: recipe for target 'all' failed
make: *** [all] Error 127

I get the same result using make TARGET=Linux apps.

What I understand from the code you quoted, is that the Makefile only checks if there is a /.dockerenv to launch docker or not.

You can (and I did) build natively by calling the Makefile from Build/, as said @leonrinkel :

Building without Docker is already possible by running something like make -f Build/Makefile instead of using the default root-level Makefile. A flag would make that even clearer.

EDIT : I made a MR (#29) with what I think is a good way to disable Docker (enabled by default).

Clovel added a commit to Clovel/HomeKitADK that referenced this issue Jan 22, 2020
Refers to the discussion in apple#23.

Signed-off-by: Clovis Durand <[email protected]>
Clovel added a commit to Clovel/HomeKitADK that referenced this issue Jan 22, 2020
Refers to the discussion in apple#23.

Signed-off-by: Clovis Durand <[email protected]>
@aajain-com aajain-com assigned aajain-com and unassigned pgravel-com Jan 22, 2020
Clovel added a commit to Clovel/HomeKitADK that referenced this issue Jan 24, 2020
Refers to the discussion in apple#23.

Signed-off-by: Clovis Durand <[email protected]>
Clovel added a commit to Clovel/HomeKitADK that referenced this issue Jan 25, 2020
Refers to the discussion in apple#23.

Signed-off-by: Clovis Durand <[email protected]>
Clovel added a commit to Clovel/HomeKitADK that referenced this issue Jan 25, 2020
Refers to the discussion in apple#23.

Signed-off-by: Clovis Durand <[email protected]>
Clovel added a commit to Clovel/HomeKitADK that referenced this issue Jan 29, 2020
Refers to the discussion in apple#23.

Signed-off-by: Clovis Durand <[email protected]>
Clovel added a commit to Clovel/HomeKitADK that referenced this issue Jan 29, 2020
Refers to the discussion in apple#23.

Signed-off-by: Clovis Durand <[email protected]>
Clovel added a commit to Clovel/HomeKitADK that referenced this issue Feb 3, 2020
Refers to the discussion in apple#23.

Signed-off-by: Clovis Durand <[email protected]>
Clovel added a commit to Clovel/HomeKitADK that referenced this issue Feb 3, 2020
Refers to the discussion in apple#23.

Signed-off-by: Clovis Durand <[email protected]>
Clovel added a commit to Clovel/HomeKitADK that referenced this issue Feb 3, 2020
Refers to the discussion in apple#23.

Signed-off-by: Clovis Durand <[email protected]>
Clovel added a commit to Clovel/HomeKitADK that referenced this issue Feb 3, 2020
Refers to the discussion in apple#23.

Signed-off-by: Clovis Durand <[email protected]>
Clovel added a commit to Clovel/HomeKitADK that referenced this issue Feb 3, 2020
Refers to the discussion in apple#23.

Signed-off-by: Clovis Durand <[email protected]>
Clovel added a commit to Clovel/HomeKitADK that referenced this issue Feb 3, 2020
Refers to the discussion in apple#23.

Signed-off-by: Clovis Durand <[email protected]>
aajain-com pushed a commit that referenced this issue Feb 3, 2020
Refers to the discussion in #23.

Signed-off-by: Clovis Durand <[email protected]>
@Clovel Clovel closed this as completed Feb 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants