kmahyyg/ztncui-aio

Zerotier and gosu upgrade

pjv opened this issue · 14 comments

pjv commented

Hi @kmahyyg,

Can you explain how to use this repo to generate an image of ztncui that includes zerotier version 1.6.5 (and any further updates to zerotier)?

Please use the official maintained version: https://github.com/key-networks/ztncui-aio

Since I won't publish any built image, it use scripts from Zerotier official. Check their guide please. The script should always install the latest stable version of zerotier.

pjv commented

I would have posted the question in the official repo but they have disabled issues and discussion so nowhere there to post a question or an issue.

Need more information.

Please tell me more about what you have done, what you met and what is expected.

pjv commented

I’m running a ztncui instance based on pulling the latest version of keynetworks/ztncui from docker hub.

That image has version 1.6.4 of zerotier one in it.

I would like to build a new ztncui image with version 1.6.5 of zerotier one and I think that this repo would allow me to build such an image, but I don’t understand how to use the code here to generate that image. The “usage” information in the readme looks to me like it is also just pulling the keynetworks/ztncui image from docker hub and running it.

How do I build a new updated ztncui image?

Clone this repo and after that, on content root, run docker build . -t keynetworks/ztncui:latest , this should work.

Others as usual.

pjv commented

Thanks!

pjv commented

The build failed here:

*** ZeroTier One Quick Install for Unix-like Systems

*** Tested distributions and architectures:
***   MacOS (10.7+) on x86_64 (just installs ZeroTier One.pkg)
***   Debian (7+) on x86_64, x86, arm, and arm64
***   RedHat/CentOS (6+) on x86_64 and x86
***   Fedora (16+) on x86_64 and x86
***   SuSE (12+) on x86_64 and x86
***   Mint (18+) on x86_64, x86, arm, and arm64

*** Please report problems to contact@zerotier.com and we will try to fix.

*** Detecting Linux Distribution

*** FAILED: unrecognized or ancient distribution: bookworm
The command '/bin/sh -c apt update -y &&     apt install curl gnupg2 ca-certificates unzip supervisor net-tools procps --no-install-recommends -y &&     groupadd -g 2222 zerotier-one &&     useradd -u 2222 -g 2222 zerotier-one &&     curl -sL -o ztone.sh https://install.zerotier.com &&     bash ztone.sh &&     rm -f ztone.sh &&     apt clean -y &&     rm -rf /var/lib/zerotier-one &&     rm -rf /var/lib/apt/lists/*' returned a non-zero code: 1

I use the latest Debian unstable which is a rolling distro as the base of this image.

Since current Debian sid is Debian 12, which is not supported by Zerotier official scripts.

Either modify the script yourself and build from source, or you change https://github.com/kmahyyg/ztncui-aio/blob/master/Dockerfile Line 1 and Line 49, replace from sid-slim to buster.

This behavior is intended.

pjv commented

Thanks again. The build worked substituting buster for sid-slim in the Dockerfile.

But the resulting container errors out trying to bring up the ztncui process. Logs look like this:

ztncui_1  | 2021-09-07 15:19:33,605 INFO exited: ztncui (exit status 1; not expected)
ztncui_1  | 2021-09-07 15:19:34,608 INFO spawned: 'ztncui' with pid 34
ztncui_1  | 2021-09-07 15:19:34,627 INFO exited: ztncui (exit status 1; not expected)
ztncui_1  | 2021-09-07 15:19:36,630 INFO spawned: 'ztncui' with pid 57
ztncui_1  | 2021-09-07 15:19:36,646 INFO exited: ztncui (exit status 1; not expected)
ztncui_1  | 2021-09-07 15:19:39,651 INFO spawned: 'ztncui' with pid 72
ztncui_1  | 2021-09-07 15:19:39,668 INFO exited: ztncui (exit status 1; not expected)

I shelled into the container and manually ran start_ztncui.sh and this is the output:

error: "gosu" appears to be installed with the 'setuid' bit set, which is an *extremely* insecure and completely unsupported configuration! (what you want instead is likely 'sudo' or 'su')

I'm so sorry for bringing you so much inconvenience. Since this repo is not updated so long till now and there's nobody telling me if any issue here, I have not known that before.

Please keep this issue open and wait, I will build a new working version to resolve all the problems. Thank you.

ETA: 24hrs-48hrs.

pjv commented

@kmahyyg No problem at all and no apologies necessary. Thank you for your work!!!!

Please do not use it until further straight notice here. I pushed this commit for internal CI purpose, still testing yet.

Tested, it works on my machine. I've also pushed the docker image into GitHub Container Registry. Check the readme file for more details and pull image directly from GitHub without any rate limit.

Enjoy Hacking!

Thanks again for your feedback. @pjv

pjv commented

Confirmed here. I pulled master on this repo and built a new image and the generated container is running fine now.

Thanks again @kmahyyg.