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

ci: Work on publishing a docker container #14

Merged
merged 1 commit into from
Feb 15, 2024
Merged

ci: Work on publishing a docker container #14

merged 1 commit into from
Feb 15, 2024

Conversation

laduke
Copy link
Contributor

@laduke laduke commented Feb 15, 2024

This is a first pass at making this into a docker. I've tested something similar in another repo, but this kind of thing always takes a couple tries -Getting CI to run correctly.

To test locally, you can do:
docker build . -t pylon -f Dockerfile
docker run --init -p 443:443 -p 19993:9993/udp -t pylon reflect
I'm sure this is fine though.
refract should work too, but I haven't practiced getting the args for that correct yet. Maybe we need to pass a file into the container for that to work?

I have README edits ready too, but will publish them later when we know things are working.

@laduke laduke requested a review from joseph-henry February 15, 2024 21:00
@laduke
Copy link
Contributor Author

laduke commented Feb 15, 2024

actually refract doesn't want to work in a container.

        pylon.cpp:001294:                     main: Address on network 6ab565387a123456 is 172.23.184.21
{
        "listen_addr":1.0.0.0,
        "listen_port":1080,
        "node_id":37d6e1336b,
        "net_id":6ab565387a442f6f
}
bind: Cannot assign requested address

Yeah I'm not sure. someone'll have to test on linux. Probably have to give it some permissions.

It's still worth doing if only for reflect.

edit: yeah it boots ok with host network and net cap admin

docker run --init -e ZT_PYLON_SECRET_KEY=$(cat identity.secret) -e ZT_PYLON_WHITELISTED_PORT=4545 \
--net=host --cap-add NET_ADMIN -t \
pylon refract 6ab565387a123456 --listen-addr 0.0.0.0 --listen-port 1080

@laduke laduke merged commit 906cbb9 into main Feb 15, 2024
7 checks passed
@laduke laduke deleted the tl-docker-run branch February 15, 2024 22:45
@laduke laduke mentioned this pull request Feb 27, 2024
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

Successfully merging this pull request may close these issues.

1 participant