Publish container images
svenstaro opened this issue ยท 11 comments
I really like xiu but currently deploying it is a bit tedious because I first need to compile it on my server and then start it. I think it might be more convenient if you used either DockerHub or the GitHub Container Registry to publish pre-built images (with the WebRTC web files in the right location for the binary already).
This could also solve #80 if you published multi-arch packages. You can copy parts of the process from miniserve if you like.
Thanks @harlanc for the great project.
I'm a rust noob and do not have the rust knowledge or toolchain on my computer to build xiu.
Please see the attached build scripts which will create a docker container and build xiu inside it. The host machine does not need any rust tools, the entire build is inside docker. Using this build script, I have successfully built xiu on Linux x64 and aarch64.
To use, unzip the build.zip file into the repo base directory and run ./build.sh
. Please consider adding build.sh
and build2.sh
to the repo if you find it useful.
As @svenstaro suggests having pre-built images will be fabulous. Also please consider releasing binaries on GitHub for those who want to run xiu natively without docker ๐
Attachments: build.zip
@rsubr Thanks for your new idea to build xiu, I run the script on my M1 Mac book, after the compilation process is completed, a "xiu" binary is generated on macOS, but this binary can only be run inside the docker image where xiu was compiled due to system differences, the system of docker is :
Linux beb91e124e02 5.10.47-linuxkit #1 SMP PREEMPT Sat Jul 3 21:50:16 UTC 2021 aarch64 GNU/Linux
So this script will pull a corresponding Linux version for the CPU architecture of your physical machine for compilation.,
right๏ผI will consider whether to add it to the repository, thank you. ๐
@svenstaro
Based on your GitHub Action workflow, pre-builds for some CPU architectures have been generated successfully, but the Docker image publishing failed which will be fixed in the next release. Thank you.
Great to hear!
@svenstaro A question about podman push in github action, where's the value of the environment variable "needs.publish.outputs.version" read from? I can retrieve the value during testing, but I don't know why I can't get it in the official release, it's empty:
It's the output of a step of another job, see here: https://github.com/svenstaro/miniserve/blob/b78c59ead7184cbcc937153f36a5e6420e49b8d2/.github/workflows/build-release.yml#L10. This refers to this: https://github.com/svenstaro/miniserve/blob/b78c59ead7184cbcc937153f36a5e6420e49b8d2/.github/workflows/build-release.yml#L103
Since we talk about packaging and distribution here...
@svenstaro do you plan do add xiu to Arch repos or is it safe to make an AUR package?
I've been aware of it for a few years and using it from time to time, but didn't push to AUR for others.
It's the output of a step of another job, see here: https://github.com/svenstaro/miniserve/blob/b78c59ead7184cbcc937153f36a5e6420e49b8d2/.github/workflows/build-release.yml#L10. This refers to this: https://github.com/svenstaro/miniserve/blob/b78c59ead7184cbcc937153f36a5e6420e49b8d2/.github/workflows/build-release.yml#L103
@svenstaro The problem is fixed, thanks.
Since we talk about packaging and distribution here...
@svenstaro do you plan do add xiu to Arch repos or is it safe to make an AUR package?
I've been aware of it for a few years and using it from time to time, but didn't push to AUR for others.
I might push it to repos later on. Let's have it in AUR for now.
I might push it to repos later on. Let's have it in AUR for now.
okay, boss