void-docs
void-docs copied to clipboard
Docker: Moved page from wiki and added to it.
Moved Docker info from wiki to void-docs. Added a little about void-linux docker images.
Not sure what failed. Tell me what I need to fix and I will
Following the "Details" link next to "The Travis CI build failed", it looks like you might not have run the file through vmdfmt, as per the Handbook style guide.
Also, the style guide notes:
when writing documentation for the foo package, do not provide a command code-block stating that one should install it via
xbps-install foo.
@flexibeast Thanks, I i will fix it. I was using mdbook to view it and assume mdbook build ran it thourh vmdfmt as well.
My bad on needing to force it twice. Forgot to git add the changes. Should look a lot better now too. Let me know what you think.
Firstly, thanks for taking the time to work on porting content from the wiki!
i'm not a member of the Void team, myself, so i'm not in a position to make an 'official' review, but for what it's worth, here are some initial thoughts:
-
There are several typos in the PR: 'deplay' rather than 'deploy', 'reosurces' rather than 'resources', 'folllowing' rather than 'following', 'adiition' rather than 'addition', 'diplayed' rather than 'displayed', 'docker' rather than 'Docker' (when not referring to the
dockercommand or group), 'void' rather than 'Void', 'linux' rather than 'Linux'. -
i'm not sure the text:
It has become increasingly popular because it can be used to deplay large number of containers quickly, easily, and scales well. It also uses less reosurces than a typical VM.
should be included; it sounds more like promotional material than technical documentation.
-
As per the style guide, references to standard calls to
xbps-install, as on line 17, are not needed. -
The text:
To install docker, and optionally, docker-compose run the folllowing command. Docker Compose is a tool to create and run multi-container Docker apps. After the install, be sure to enable and start the service before trying to use it. If it is not enabled, it will not work. In adiition, you will need to add your user to the docker group.
# xbps-install -S docker docker-compose# ln -s /etc/sv/docker /var/service# usermod -aG docker $USER
could be shortened to:
After installing the
dockerpackage (and optionally, thedocker-composepackage), enable thedockerservice:
# ln -s /etc/sv/docker /var/serviceand add your user to the
dockergroup:
# usermod -aG docker $USER
- i'm not sure it's necessary for the documentation to include checking whether the
dockercommand is available post-installation, but if so, this could all be shortened down to$ docker -v, rather than includingdockerhelp output.
Obviously the typos can be corrected immediately, but the other suggestions i made should wait on any comment(s) by a member of the Void team.
I will go ahead and make the changes you pointed out as I agree with all accounts. Thanks! I'll check back in after the changes!
Think it looks a lot better per your suggestions. Thanks
- Line 4 has 'visualisation' instead of 'virtualisation'.
- Line 8: the first instance of
dockershould be in backticks (`) rather than straight quotes. - More generally, there are still several instances of uncapitalised 'Docker': lines 21, 23, 75, 78, 85.
- Line 76: "docker-compose file" here should probably be "Docker Compose file".
oh man I had autocorrect spell. Let me fix these. Thanks.
@flexibeast
Okay, I fixed everything you pointed out. Sorry for the trouble :(
Quick question, is it virtualization or virtualisation? Void Linux Is Europe-based and I am pretty sure an s is used whereas in the United States where I am, we usually use a z. So should I put virtualisation? I know my computer marks it as misspelled with an s, and I am not going to lie, it does look a little odd to me, but I have seen civilisation in Europe and I know we spell it civilization. So I do want to double check that is how it is spelled in Europe. :) And then I will push it.
Quick question, is it virtualization or virtualisation?
Well, i'm in Australia, and like many other Commonwealth nations, we tend to prefer British spellings to US spellings, so for us it's 'virtualisation' rather than 'virtualization'. That said, i don't know if there's a policy on this; a search for 'zation' in the Handbook returns no results, and a search for 'sation' in the Handbook shows 'customisation' used in config/services/configuring.md, but that was added by me. :-)
Well, guess I will just go with the Commonwealth spelling for consistency. Somehow I always run into the some odd edge cases in my work ;/ Let me push it now with that change.
@Frick-David do you have any podman knowledge (mentioning it here because it's related to docker)? I couldn't get it working last time I tried (on musl, though).
@ericonr I do not, but maybe I can help. Are you getting any sort of error message?
@ericonr So I ran xbps-install -S podman
When I run podman I get a systemd Cgroup error, which happens for quite a bit of programs that were designed for GNU/Linux.
I then ran the following commands:
# mkdir /sys/fs/cgroup/systemd
# mount -t cgroup -o none,name=systemd cgroup /sys/fs/cgroup/systemd
I then ran the command:
podman run -dt -p 8080:8080/tcp -e HTTPD_VAR_RUN=/var/run/httpd -e HTTPD_MAIN_CONF_D_PATH=/etc/httpd/conf.d \
-e HTTPD_MAIN_CONF_PATH=/etc/httpd/conf \
-e HTTPD_CONTAINER_SCRIPTS_PATH=/usr/share/container-scripts/httpd/ \
registry.fedoraproject.org/f29/httpd /usr/bin/run-httpd
which is on the podman website Getting Started section. The command did succesfully run the web server.
@Frick-David I did try setting up the /sys/fs/cgroup/systemd folder, and that worked (btw, what a weird folder it is).
And obviously now that I tried getting tech support it worked perfectly. I was getting some weird access issues while trying to run without root. I'm not sure what caused them, but they were a while ago, so some update might have managed to fix my issue in some indirect manner. Or perhaps enought reboots after enabling the cmanager and ConsoleKit2 services was enough.
Thanks a lot for the help, anyway!
That is good to hear! Yeah, generally when I have an issue it tends to be either a permissions issue as well. Python 3 also seems to be really picky about that!. Any chance I can convince you to add podman documentation to the void-docs :) ? Regardless, best of luck. Podman seems pretty cool! I might start using it myself.
Any chance I can convince you to add podman documentation to the void-docs :) ?
@Frick-David what do you think about making this a single page about containerization? Then Docker and Podman could be subheaders inside it. From my brief experience with podman, all it required was mounting the cgroups fs, so that step could be listed as relevant for both of them. When this gets merged I can add the additional Podman info.
@ericonr can you confirm that the cgroups is still needed then? I installed the docker package and started the service and all was well. Can't dig into it right now myself.
Yeah, neither docker nor podman are asking for any cgroups stuff any more here.
@bobertlo So I will make the changes requested.
Was the package changed such that the cgroups section should be removed as well?
@Frick-David do you have elogind enabled? If you don't, I believe your system will still require the cgroups section. Try to install and enable it to verify if the cgroups section is necessary then.
@bobertlo if it works cleanly with elogind do you think it's valid to only list that or should we list both options?
Oh I do have elogind running that could be it. New to running it so I didn't consider that.
I don't really use docker, but I know that there should be a note about the docker group that its equivalent to becoming root.
See the warning in archs wiki.
So I reread the documentation and one of the beginning pages says this wiki is for configuring the system only. So docker, nor my other commit, steam are necessary. However, I have seen people talk about a miscellaneous section. Can I have some direction on this as I do feel adding these pages to the 'core' documentation seems iffy. It is a different format than the wiki.
@ericonr It should be good on the cgroups like you said.
@ericonr: Reviewing this PR again, i'm not sure of the extent to which it needs to be a separate page. From what i can tell, the critical parts are:
- You need to be a member of the
dockergroup to use it; thedockergroup is equivalent to becoming root. - If you're not using
elogind, you need to do cgroups stuff.
In this comment, you suggested that we instead have a "Containerization" section, in which this information could be included. If you still think that's the way to go, i'm fine with that.
@flexibeast, what are your thoughts on this now? Should we put docker into the external applications page?
@Frick-David: i'm thinking that maybe we could have a "Containers and VMs" section, which would mention not only Docker, but also e.g. Podman, QEMU and libvirt. i'm going to check with more senior members of the Void team if they have any objections to such a section being included.
@Frick-David: After asking on IRC, there don't seem to be any immediate objections to such a section, so i've just opened #350, so that Void team members not currently around on IRC can comment if necessary.