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

ZeroTier package in Alpine #370

Closed
ramarnat opened this issue Jul 26, 2016 · 16 comments
Closed

ZeroTier package in Alpine #370

ramarnat opened this issue Jul 26, 2016 · 16 comments

Comments

@ramarnat
Copy link

Creating this here for tracking purposes.

ZeroTier should be available in the Alpine Linux Repo (especially for docker installations).

https://pkgs.alpinelinux.org/packages

@kyleparisi
Copy link

Absolute noob about this but I gave it a shot and got the following error after running make:

osdep/LinuxEthernetTap.cpp:35:22: fatal error: linux/if.h: No such file or directory
compilation terminated.
<builtin>: recipe for target 'osdep/LinuxEthernetTap.o' failed
make: *** [osdep/LinuxEthernetTap.o] Error 1

Probably not a great idea to do it in the alpine docker image? If not, I can image an old computer I have with alpine at some point.

@adamierymenko
Copy link
Contributor

There is a package in Alpine with kernel headers like this. Forget what it is called.

@adamierymenko
Copy link
Contributor

Alpine is designed to be super minimal and does not install such things by default, while other distros do.

@kyleparisi
Copy link

Ok, I'll try to look those up after the holiday.

@kyleparisi
Copy link

Got slightly further this time. Needed to install linux-headers, bash, man-pages (maybe?), nodejs. I ran make selftest and didn't see any problems. I presume all I need to do now is to finish following this wiki.

I'm thinking I'll start with the init.d script part. Is there something I can reference for this?

@kyleparisi
Copy link

Does anyone know OpenRC (Alpine init system)? Struggling at getting the init script in.

@adamierymenko
Copy link
Contributor

You're telling me Linux now has another init system?

I've got the solution! (goes off to write yet another init system)

@dafyre
Copy link

dafyre commented Sep 27, 2016

You can call it YAInit!

On Tue, Sep 27, 2016 at 8:57 AM Adam Ierymenko notifications@github.com
wrote:

You're telling me Linux now has another init system?

I've got the solution! (goes off to write yet another init system)


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#370 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AMv-Trtxq8mmFC6r-FYV5t5zIUClbmKCks5quRK0gaJpZM4JVdlw
.

@bonki
Copy link
Contributor

bonki commented Sep 27, 2016

You're telling me Linux now has another init system?

I've got the solution! (goes off to write yet another init system)

You need not worry, OpenRC is ~10 years old already :-) (primarily developed for and by a then-Gentoo developer but it's used by other Linux and even BSD distributions IIRC).

Does anyone know OpenRC (Alpine init system)? Struggling at getting the init script in.

That's what I use on Gentoo, couldn't be more basic:

#!/sbin/runscript

ZEROTIERONE_PIDFILE="/var/run/${SVCNAME}.pid"

depend() {
    need net
}

start() {
    ebegin "Starting zerotier-one"
    start-stop-daemon --start \
        --exec /usr/bin/zerotier-one --make-pidfile --pidfile "${ZEROTIERONE_PIDFILE}" --background
    eend $?
}

stop() {
    ebegin "Stopping zerotier-one"
    start-stop-daemon --stop --quiet --pidfile "${ZEROTIERONE_PIDFILE}"
    eend $?
}

@kyleparisi
Copy link

@bonki I tried something similar but I'll give what you posted a try. Thanks.

@kyleparisi
Copy link

@bonki Looks like that worked. My issue was trying to run it on a docker alpine. Works fine on a vm.

Just need to button up the package. I'll post back here when you can view it in my fork for any feedback.

@kyleparisi
Copy link

kyleparisi/aports@e12828d

Feedback welcome. Will create PR after a few days.

@kyleparisi
Copy link

Just waiting on the PR to be merged or rejected: alpinelinux/aports#344

@kyleparisi
Copy link

So it ended up being this PR instead: alpinelinux/aports#533

I'm not entirely sure when I can have the package be part of the main apk. If you want to test/start using in the mean time it'd be something like

vi /etc/apk/repositories
apk update
apk add zerotier-one@testing
/etc/init.d/zerotier-one start

@kyleparisi
Copy link

@ramarnat, @adamierymenko has taken over via: alpinelinux/aports#1379

You think it possible to also close: https://www.bountysource.com/issues/36370440-zerotier-package-in-alpine 😀

@zar3bski
Copy link

zar3bski commented May 1, 2020

Got slightly further this time. Needed to install linux-headers, bash, man-pages (maybe?), nodejs. I ran make selftest and didn't see any problems. I presume all I need to do now is to finish following this wiki.

I'm thinking I'll start with the init.d script part. Is there something I can reference for this?

Experienced similar issue: linux-headers should become a reflex while building alpine based image

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

6 participants