<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.alpinelinux.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Fabricionaweb</id>
	<title>Alpine Linux - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.alpinelinux.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Fabricionaweb"/>
	<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/wiki/Special:Contributions/Fabricionaweb"/>
	<updated>2026-05-10T04:12:41Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.40.0</generator>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Alpine_Linux:IRC&amp;diff=28855</id>
		<title>Alpine Linux:IRC</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Alpine_Linux:IRC&amp;diff=28855"/>
		<updated>2025-01-21T10:58:33Z</updated>

		<summary type="html">&lt;p&gt;Fabricionaweb: add #alpine-security channel&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Channels ==&lt;br /&gt;
&lt;br /&gt;
Alpine Linux has registered the following channels on the [https://www.oftc.net/ OFTC] IRC network:&lt;br /&gt;
;[ircs://irc.oftc.net/alpine-linux #alpine-linux]&lt;br /&gt;
: For general discussion and quick support questions.&lt;br /&gt;
;[ircs://irc.oftc.net/alpine-devel #alpine-devel]&lt;br /&gt;
: For discussion of Alpine Linux development and developer support.&lt;br /&gt;
;[ircs://irc.oftc.net/alpine-docs #alpine-docs]&lt;br /&gt;
: For discussion of Alpine Linux documentation.&lt;br /&gt;
;[ircs://irc.oftc.net/alpine-offtopic #alpine-offtopic]&lt;br /&gt;
: For general chitchat.&lt;br /&gt;
;[ircs://irc.oftc.net/alpine-cloud #alpine-cloud]&lt;br /&gt;
: For discussion of Alpine Linux Cloud images.&lt;br /&gt;
;[ircs://irc.oftc.net/alpine-commits #alpine-commits]&lt;br /&gt;
: Bot posts information about commits and builds in this channel.&lt;br /&gt;
;[ircs://irc.oftc.net/alpine-infra #alpine-infra]&lt;br /&gt;
: For discussion of Alpine Linux Infrastructure and the Team.&lt;br /&gt;
;[ircs://irc.oftc.net/alpine-security #alpine-security]&lt;br /&gt;
: For discussion of Alpine Linux Security and the Team.&lt;br /&gt;
[https://irclogs.alpinelinux.org IRC Logs - Archived IRC messages]&lt;br /&gt;
&lt;br /&gt;
Feel free to join and chat! Please be patient when asking questions, it may take a while for someone to answer.&lt;br /&gt;
&lt;br /&gt;
== New to IRC? ==&lt;br /&gt;
&lt;br /&gt;
If you are new to IRC and would like to try it out in your browser, see [https://webchat.oftc.net/ OFTC Web IRC]. Make sure you specify one of the above channels when you connect.&lt;br /&gt;
&lt;br /&gt;
Also see [https://en.wikipedia.org/wiki/Wikipedia:IRC/Tutorial Wikipedia&#039;s IRC tutorial].&lt;br /&gt;
&lt;br /&gt;
== Clients ==&lt;br /&gt;
&lt;br /&gt;
There are several free IRC clients available. Here are some popular clients:&lt;br /&gt;
&lt;br /&gt;
* [https://irssi.org/ Irssi]&lt;br /&gt;
* [https://weechat.org/ WeeChat]&lt;br /&gt;
* [https://hexchat.github.io/ HexChat]&lt;br /&gt;
* [http://www.eterna.com.au/ircii/ ircII]&lt;br /&gt;
* [https://pidgin.im/ Pidgin]&lt;br /&gt;
&lt;br /&gt;
Also see [https://en.wikipedia.org/wiki/Comparison_of_Internet_Relay_Chat_clients Wikipedia&#039;s comparison of IRC clients].&lt;/div&gt;</summary>
		<author><name>Fabricionaweb</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Alpine_Linux:IRC&amp;diff=28854</id>
		<title>Alpine Linux:IRC</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Alpine_Linux:IRC&amp;diff=28854"/>
		<updated>2025-01-21T10:55:15Z</updated>

		<summary type="html">&lt;p&gt;Fabricionaweb: add #alpine-infra channel&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Channels ==&lt;br /&gt;
&lt;br /&gt;
Alpine Linux has registered the following channels on the [https://www.oftc.net/ OFTC] IRC network:&lt;br /&gt;
;[ircs://irc.oftc.net/alpine-linux #alpine-linux]&lt;br /&gt;
: For general discussion and quick support questions.&lt;br /&gt;
;[ircs://irc.oftc.net/alpine-devel #alpine-devel]&lt;br /&gt;
: For discussion of Alpine Linux development and developer support.&lt;br /&gt;
;[ircs://irc.oftc.net/alpine-docs #alpine-docs]&lt;br /&gt;
: For discussion of Alpine Linux documentation.&lt;br /&gt;
;[ircs://irc.oftc.net/alpine-offtopic #alpine-offtopic]&lt;br /&gt;
: For general chitchat.&lt;br /&gt;
;[ircs://irc.oftc.net/alpine-cloud #alpine-cloud]&lt;br /&gt;
: For discussion of Alpine Linux Cloud images.&lt;br /&gt;
;[ircs://irc.oftc.net/alpine-commits #alpine-commits]&lt;br /&gt;
: Bot posts information about commits and builds in this channel.&lt;br /&gt;
;[ircs://irc.oftc.net/alpine-infra #alpine-infra]&lt;br /&gt;
: For discussion of Alpine Linux Infrastructure and the Team.&lt;br /&gt;
[https://irclogs.alpinelinux.org IRC Logs - Archived IRC messages]&lt;br /&gt;
&lt;br /&gt;
Feel free to join and chat! Please be patient when asking questions, it may take a while for someone to answer.&lt;br /&gt;
&lt;br /&gt;
== New to IRC? ==&lt;br /&gt;
&lt;br /&gt;
If you are new to IRC and would like to try it out in your browser, see [https://webchat.oftc.net/ OFTC Web IRC]. Make sure you specify one of the above channels when you connect.&lt;br /&gt;
&lt;br /&gt;
Also see [https://en.wikipedia.org/wiki/Wikipedia:IRC/Tutorial Wikipedia&#039;s IRC tutorial].&lt;br /&gt;
&lt;br /&gt;
== Clients ==&lt;br /&gt;
&lt;br /&gt;
There are several free IRC clients available. Here are some popular clients:&lt;br /&gt;
&lt;br /&gt;
* [https://irssi.org/ Irssi]&lt;br /&gt;
* [https://weechat.org/ WeeChat]&lt;br /&gt;
* [https://hexchat.github.io/ HexChat]&lt;br /&gt;
* [http://www.eterna.com.au/ircii/ ircII]&lt;br /&gt;
* [https://pidgin.im/ Pidgin]&lt;br /&gt;
&lt;br /&gt;
Also see [https://en.wikipedia.org/wiki/Comparison_of_Internet_Relay_Chat_clients Wikipedia&#039;s comparison of IRC clients].&lt;/div&gt;</summary>
		<author><name>Fabricionaweb</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Release_Notes_for_Alpine_3.21.0&amp;diff=28096</id>
		<title>Release Notes for Alpine 3.21.0</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Release_Notes_for_Alpine_3.21.0&amp;diff=28096"/>
		<updated>2024-12-05T15:02:24Z</updated>

		<summary type="html">&lt;p&gt;Fabricionaweb: add .net6 eol information&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;As always, make sure to read [[Upgrading Alpine to a new major release]] when upgrading to a new release.&lt;br /&gt;
&lt;br /&gt;
If you experience any issues with the upgrade, please let us know and file an issue in our repositories.&lt;br /&gt;
&lt;br /&gt;
== Important changes ==&lt;br /&gt;
&lt;br /&gt;
=== OpenSSH service requires restart ===&lt;br /&gt;
&lt;br /&gt;
From the &amp;lt;code&amp;gt;9.8_p1&amp;lt;/code&amp;gt; release, and on, of {{pkg|openssh}}, {{pkg|openssh-server}} is split into two binaries (&amp;lt;code&amp;gt;/usr/lib/ssh/sshd-session&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/usr/sbin/sshd&amp;lt;/code&amp;gt;). Due to this change, it will not be possible to &amp;lt;code&amp;gt;ssh&amp;lt;/code&amp;gt; into a system that has upgraded from a release prior to &amp;lt;code&amp;gt;9.8_p1&amp;lt;/code&amp;gt; to this release or later, without restarting the &amp;lt;code&amp;gt;sshd&amp;lt;/code&amp;gt; service.&lt;br /&gt;
&lt;br /&gt;
We have previously brought attention to this - https://alpinelinux.org/posts/2024-07-02-openssh-upgrade-edge.html&lt;br /&gt;
&lt;br /&gt;
Managing services has always been out-of-scope for {{pkg|apk-tools}}, but this one time we will &#039;&#039;&#039;make an exception&#039;&#039;&#039; when the following conditions are met:&lt;br /&gt;
# You have both the {{pkg|openssh-server}} and {{pkg|openssh-server-common-openrc}} packages installed at a version lower than &amp;lt;code&amp;gt;9.8_p1&amp;lt;/code&amp;gt;&lt;br /&gt;
# The &amp;lt;code&amp;gt;sshd&amp;lt;/code&amp;gt; service is started&lt;br /&gt;
&lt;br /&gt;
We will then, post {{pkg|openssh-server}} upgrade, have a &amp;lt;code&amp;gt;post-upgrade&amp;lt;/code&amp;gt; script that will:&lt;br /&gt;
# Print a message on what is about to happen and why&lt;br /&gt;
# Restart the &amp;lt;code&amp;gt;sshd&amp;lt;/code&amp;gt; service&lt;br /&gt;
# If the command to restart the service fails for any reason, a warning message will be printed and an error code returned to &amp;lt;code&amp;gt;apk&amp;lt;/code&amp;gt;, to be noticed by the end of the package upgrades (this will not interrupt the upgrade process).&lt;br /&gt;
&lt;br /&gt;
We have decided to do this in order to help keep you from getting locked out of your system(s) and be able to fix any issues with the upgrade.&lt;br /&gt;
&lt;br /&gt;
See also:&lt;br /&gt;
* https://bugzilla.mindrot.org/show_bug.cgi?id=3706&lt;br /&gt;
* https://git.alpinelinux.org/aports/commit/?id=6adff08ae09961d4eea66b55a8cca14d3941fb53&lt;br /&gt;
&lt;br /&gt;
=== New loongarch64 architecture ===&lt;br /&gt;
&lt;br /&gt;
Alpine 3.21 is the first release which is available for &amp;lt;code&amp;gt;loongarch64&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Thanks to the support of the team of Loongson dedicated to supporting Alpine Linux and many other contributors.&lt;br /&gt;
&lt;br /&gt;
=== Preparations for /usr-merge ===&lt;br /&gt;
&lt;br /&gt;
Plans for /usr-merge are underway and we should be able to finalize it in Alpine Linux, version 3.22.&lt;br /&gt;
&lt;br /&gt;
Much preparation has gone into this release to ensure that the merge happens as smoothly as possible. That included moving the location of some binaries and many libraries from &amp;lt;code&amp;gt;/bin&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/sbin&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;/lib&amp;lt;/code&amp;gt; to their counterparts in &amp;lt;code&amp;gt;/usr&amp;lt;/code&amp;gt;. As part of the merge, &amp;lt;code&amp;gt;/usr&amp;lt;/code&amp;gt; will be mounted from the initramfs to make sure everybody has all necessary binaries in place.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Users with installations where &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/usr&amp;lt;/code&amp;gt; are on separate filesystems (partitions, volumes, disk drives or other) should proceed with care and report any issues.&#039;&#039;&#039;  They should also ensure that an entry &amp;lt;code&amp;gt;/usr&amp;lt;/code&amp;gt; is added to &amp;lt;code&amp;gt;/etc/fstab&amp;lt;/code&amp;gt; before upgrading, and all modules required to mount &amp;lt;code&amp;gt;/usr&amp;lt;/code&amp;gt; from the initramfs are added to mkinitfs configuration. New/fresh installations of v3.21 will work out of the box without modification. Please note that &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt; on separate filesystem than &amp;lt;code&amp;gt;/usr&amp;lt;/code&amp;gt; is not officially supported.&lt;br /&gt;
&lt;br /&gt;
If you have one of these setups, and have doubts about the configuration, you can open an [https://gitlab.alpinelinux.org/alpine/aports/-/issues/new issue] and ping &amp;lt;code&amp;gt;@pabloyoyoista&amp;lt;/code&amp;gt;. We will also publish a blog post soon with further information on the timeline and progress of the merge, as well as how the changes may affect users.&lt;br /&gt;
&lt;br /&gt;
== Significant changes ==&lt;br /&gt;
&lt;br /&gt;
=== Jellyfin ===&lt;br /&gt;
&lt;br /&gt;
Jellyfin now uses the recommended fork of ffmpeg called {{pkg|jellyfin-ffmpeg}} by default. If you want to change the default, take a look at the &amp;lt;code&amp;gt;ffmpegpath&amp;lt;/code&amp;gt; variable in &amp;lt;code&amp;gt;/etc/conf.d/jellyfin&amp;lt;/code&amp;gt;. ({{MR|69924}})&lt;br /&gt;
&lt;br /&gt;
Jellyfin was disabled for ARM architectures (&amp;lt;code&amp;gt;aarch64&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;armv7&amp;lt;/code&amp;gt;) and is only available for &amp;lt;code&amp;gt;x86_64&amp;lt;/code&amp;gt;. ({{Issue|16613}})&lt;br /&gt;
&lt;br /&gt;
=== Bats ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;main/bats&amp;lt;/code&amp;gt; was renamed to &amp;lt;code&amp;gt;main/bats-core&amp;lt;/code&amp;gt;. There is now a meta package &amp;lt;code&amp;gt;community/bats&amp;lt;/code&amp;gt; which contains:&lt;br /&gt;
&lt;br /&gt;
* {{pkg|bats-core}}&lt;br /&gt;
* {{pkg|bats-file}}&lt;br /&gt;
* {{pkg|bats-support}}&lt;br /&gt;
* {{pkg|bats-assert}}&lt;br /&gt;
&lt;br /&gt;
=== Xen 4.19 ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;qemu-traditional&#039;&#039; and &#039;&#039;stubdom&#039;&#039; are removed from the build in this release, see https://git.alpinelinux.org/aports/commit/?id=24217a24da3924039b000eb17c04bf3f01bf1f12&lt;br /&gt;
&lt;br /&gt;
There is still the {{pkg|xen-qemu}} package, but the regular {{pkg|qemu}} aport [https://git.alpinelinux.org/aports/commit/?id=a9249e2e0de827e88d84c01f9731aeebd248be13 is now built with Xen support], so a {{pkg|qemu-system-*}} package can be used instead.&lt;br /&gt;
&lt;br /&gt;
You can choose to use it in your &#039;&#039;xl.cfg(1)&#039;&#039; like so:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
device_model_override = &amp;quot;/usr/bin/qemu-system-x86_64&amp;quot;&lt;br /&gt;
device_model_version = &amp;quot;qemu-xen&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== uutils-coreutils ===&lt;br /&gt;
&lt;br /&gt;
{{pkg|uutils-coreutils}} is repackaged as a sub-package to {{pkg|uutils}} in such a way as to be a drop-in replacement for GNU {{pkg|coreutils}}.&lt;br /&gt;
&lt;br /&gt;
If you have both {{pkg|uutils-coreutils}} and {{pkg|coreutils}} installed, the latter will be &#039;&#039;&#039;purged&#039;&#039;&#039; and its symlinks replaced with ones pointing to the &amp;lt;code&amp;gt;/usr/bin/uutils&amp;lt;/code&amp;gt; binary. The &amp;lt;code&amp;gt;/usr/bin/uutils-*&amp;lt;/code&amp;gt; symlinks, previously provided by {{pkg|uutils-coreutils}}, no longer exist.&lt;br /&gt;
&lt;br /&gt;
If you prefer to use GNU {{pkg|coreutils}}, remove the {{pkg|uutils-coreutils}} package before upgrading, and then add the {{pkg|uutils}} package, containing the &amp;lt;code&amp;gt;/usr/bin/uutils&amp;lt;/code&amp;gt; binary.&lt;br /&gt;
&lt;br /&gt;
A few parts of the {{pkg|uutils}} aport are also split into {{pkg|uutils-*}} subpackages, to avoid conflicts or other issues.&lt;br /&gt;
&lt;br /&gt;
=== linux-firmware ===&lt;br /&gt;
&lt;br /&gt;
{{pkg|linux-firmware}} is now compressed with ZSTD compression. If you run a custom built Linux kernel, you need to ensure that &amp;lt;code&amp;gt;CONFIG_FW_LOADER_COMPRESS_ZSTD=y&amp;lt;/code&amp;gt; is set in your configuration.&lt;br /&gt;
&lt;br /&gt;
== Note-worthy updates ==&lt;br /&gt;
&lt;br /&gt;
As always, a lot of packages were upgraded. Make sure to read the indivdual release notes of the projects you use.&lt;br /&gt;
&lt;br /&gt;
* Linux 6.12&lt;br /&gt;
* busybox 1.37&lt;br /&gt;
* GCC 14.2&lt;br /&gt;
* LLVM 19&lt;br /&gt;
* Go 1.23&lt;br /&gt;
* Rust 1.83&lt;br /&gt;
* PHP 8.4&lt;br /&gt;
* GNOME 47&lt;br /&gt;
* KDE Plasma 6.2&lt;br /&gt;
* LXQt 2.1&lt;br /&gt;
* Qt 6.8&lt;br /&gt;
* wlroots 0.18&lt;br /&gt;
&lt;br /&gt;
=== GCC 14 ===&lt;br /&gt;
&lt;br /&gt;
The Gnu Compiler Collection was upgraded to 14.2.0 and as a result, all packages built with {{pkg|gcc}} in Alpine 3.21 are compiled with GCC 14.2.0.&lt;br /&gt;
&lt;br /&gt;
Make sure to read all changes: https://gcc.gnu.org/gcc-14/changes.html&lt;br /&gt;
&lt;br /&gt;
=== LXQt 2.1 ===&lt;br /&gt;
&lt;br /&gt;
LXQt has been updated to release 2.1.0 &lt;br /&gt;
* It now uses Qt6&lt;br /&gt;
* Many parts of LXQt are now Wayland ready¹, but Wayland ports of the following are pending: {{pkg|screengrab}}, {{pkg|lxqt-globalkeys}}, and keyboard indicator, some input settings, as well as settings for  monitor, power button, and screen locker.&lt;br /&gt;
* LXQt Panel has a new default application menu called Fancy Menu.&lt;br /&gt;
¹ [https://github.com/lxqt/lxqt-wayland-session lxqt-wayland-session] has not been packaged yet, but most folks wanting to test on Wayland will want to use it.&lt;br /&gt;
&lt;br /&gt;
=== Linux 6.12 ===&lt;br /&gt;
&lt;br /&gt;
Alpine 3.21.0 ships Linux 6.12.1 in the {{pkg|linux-lts}} package.&lt;br /&gt;
&lt;br /&gt;
=== PostgreSQL 17 ===&lt;br /&gt;
&lt;br /&gt;
This release features {{pkg|postgresql17}}. We dropped support for {{pkg|postgresql14}}, and moved {{pkg|postgreSQL15}} from main to community.&lt;br /&gt;
&lt;br /&gt;
=== LLVM 19 ===&lt;br /&gt;
&lt;br /&gt;
We packaged LLVM 19 in our repositories. A total of 5 LLVM versions are supported: {{pkg|llvm19}}, {{pkg|llvm18}}, {{pkg|llvm17}}, {{pkg|llvm16}}, {{pkg|llvm15}}.&lt;br /&gt;
&lt;br /&gt;
=== GNOME 47 ===&lt;br /&gt;
&lt;br /&gt;
{{pkg|gnome-software}} has been held back to version 45, after several regressions in the apk plugin on update. See {{issue|16663}} for more details.&lt;br /&gt;
&lt;br /&gt;
== Significant removals ==&lt;br /&gt;
&lt;br /&gt;
=== Disabled packages due to FTBS ===&lt;br /&gt;
&lt;br /&gt;
The following packages are temporarily disabled because they failed to build. We will try to restore them as soon as possible.&lt;br /&gt;
&lt;br /&gt;
* {{pkg|hplip}} ({{Issue|16685}})&lt;br /&gt;
* {{pkg|imageflow}} ({{Issue|16679}})&lt;br /&gt;
* {{pkg|kdevelop}} ({{MR|75839}})&lt;br /&gt;
* {{pkg|postgresql-citus}} ({{Issue|16580}})&lt;br /&gt;
* {{pkg|uvicorn}} ({{Issue|16646}})&lt;br /&gt;
* {{pkg|vulkan-validation-layers}} ({{Issue|16686}})&lt;br /&gt;
&lt;br /&gt;
=== ISC DHCP ===&lt;br /&gt;
&lt;br /&gt;
If you are still running an ISC DHCP server, you are advised to migrate to a maintained alternative &#039;&#039;&#039;before&#039;&#039;&#039; upgrading to the 3.21 release.&lt;br /&gt;
&lt;br /&gt;
ISC DHCP has been EoL since 2022. They have a guide for migrating to {{pkg|kea}} here: https://www.isc.org/dhcp_migration/&lt;br /&gt;
&lt;br /&gt;
Up to, and including, the 3.20 version of Alpine, the {{pkg|dhcp|branch=v3.20}} aport has the subpackage {{pkg|keama|branch=v3.20}} that is a tool for helping with migration from ISC DHCP configuration to ISC Kea configuration.&lt;br /&gt;
&lt;br /&gt;
Alternative DHCP servers packaged in Alpine include:&lt;br /&gt;
* {{pkg|kea}}&lt;br /&gt;
* {{pkg|freeradius-dhcp}}&lt;br /&gt;
* {{pkg|dnsmasq}}&lt;br /&gt;
* udhcpd - packaged in {{pkg|busybox-extras}}&lt;br /&gt;
&lt;br /&gt;
=== Gogs ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;gogs&amp;lt;/code&amp;gt; was removed due to multiple high-severity vulnerabilities for which issues have remained open for a year. The developers of Gogs were contacted multiple times by the Forgejo team but unfortunately received no response. Therefore we have removed Gogs from our repositories. ({{MR|75304}})&lt;br /&gt;
&lt;br /&gt;
Please consider migrating to {{pkg|forgejo|branch=edge|arch=}} or {{pkg|gitea|branch=edge|arch=}}. Both forks are available in our community repo.&lt;br /&gt;
&lt;br /&gt;
The Gitea fork of Gogs was created in 2016 by contributors who were frustrated with the single-maintainer management model of Gogs. Forgejo is a fork of Gitea which was created as a result of the for-profit company Gitea Ltd taking over maintainership (see also https://forgejo.org/compare-to-gitea/).&lt;br /&gt;
&lt;br /&gt;
=== neofetch ===&lt;br /&gt;
&lt;br /&gt;
The upstream repository was archived in April and became unmaintained, therefore we have removed it from our repositories. {{pkg|fastfetch}} provides similar functionality.&lt;br /&gt;
&lt;br /&gt;
=== .NET 6 ===&lt;br /&gt;
&lt;br /&gt;
.NET 6 reached EOL in 12 November 2024 (see https://devblogs.microsoft.com/dotnet/dotnet-6-end-of-support/) and the following packages have been moved to the testing repository ({{MR|73655}}):&lt;br /&gt;
* {{pkg|dotnet6-build|branch=edge|arch=}}&lt;br /&gt;
* {{pkg|dotnet6-runtime|branch=edge|arch=}}&lt;br /&gt;
* {{pkg|dotnet6-stage0|branch=edge|arch=}}&lt;br /&gt;
* {{pkg|lidarr|branch=edge|arch=}}&lt;br /&gt;
* {{pkg|prowlarr|branch=edge|arch=}}&lt;br /&gt;
* {{pkg|radarr|branch=edge|arch=}}&lt;br /&gt;
* {{pkg|sonarr|branch=edge|arch=}}&lt;/div&gt;</summary>
		<author><name>Fabricionaweb</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=LXC&amp;diff=24547</id>
		<title>LXC</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=LXC&amp;diff=24547"/>
		<updated>2023-08-25T10:22:01Z</updated>

		<summary type="html">&lt;p&gt;Fabricionaweb: add section about static ip using dnsmasq server method&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[https://linuxcontainers.org/ Linux Containers (LXC)] provides containers similar to BSD Jails, Linux VServers and Solaris Zones. It gives the impression of virtualization, but shares the kernel and resources with the &amp;quot;host&amp;quot;. You can use lxc directly or through [[LXD]].&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
Install the required packages:&lt;br /&gt;
{{Cmd|apk add lxc bridge lxcfs lxc-download xz}}&lt;br /&gt;
&lt;br /&gt;
If you want to create containers other than Alpine, you&#039;ll need lxc-templates:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|apk add lxc-templates}}&lt;br /&gt;
&lt;br /&gt;
== Upgrading from 2.x ==&lt;br /&gt;
&lt;br /&gt;
Starting with Alpine 3.9, we ship LXC version 3.1.&lt;br /&gt;
LXC 3.x has major changes which can and will break your current setup.&lt;br /&gt;
LXC 3.x will NOT ship with legacy container templates. Check your current container configs to see if you have any includes pointing to files that don&#039;t exist (shipped by legacy templates).&lt;br /&gt;
For example if you use Alpine containers created with the Alpine template, you&#039;ll need to install:&lt;br /&gt;
&lt;br /&gt;
 apk add lxc-templates-legacy-alpine&lt;br /&gt;
&lt;br /&gt;
Also make sure you convert your LXC config files to the new 2.x format (this is now required).&lt;br /&gt;
&lt;br /&gt;
 lxc-update-config -c /var/lib/lxc/container-name/config&lt;br /&gt;
&lt;br /&gt;
Make sure you have removed &#039;&#039;&#039;cgroup_enable&#039;&#039;&#039; from your cmdline as this will fail to mount cgroups and fail LXC service.&lt;br /&gt;
&lt;br /&gt;
== Prepare network on host ==&lt;br /&gt;
Install the {{Pkg|lxc-bridge}} package to create the &amp;lt;code&amp;gt;lxcbr0&amp;lt;/code&amp;gt; bridge and configure the forwarding routes using iptables&lt;br /&gt;
&lt;br /&gt;
 apk add lxc-bridge iptables&lt;br /&gt;
&lt;br /&gt;
Enable the dnsmasq [[OpenRC]] service at boot and start it&lt;br /&gt;
&lt;br /&gt;
 rc-update add dnsmasq.lxcbr0 boot&lt;br /&gt;
 service dnsmasq.lxcbr0 start&lt;br /&gt;
&lt;br /&gt;
If you dont want to forward the routes, add &amp;lt;code&amp;gt;DISABLE_IPTABLES=&amp;quot;yes&amp;quot;&amp;lt;/code&amp;gt; to the /etc/conf.d/dnsmasq.lxcbr0 file&lt;br /&gt;
&lt;br /&gt;
=== Assign static IP for a container ===&lt;br /&gt;
&lt;br /&gt;
Using the dnsmasq method you can leave the container interface asking for DHCP as it is. You will just need to set the DHCP server asnwers.&lt;br /&gt;
&lt;br /&gt;
By editing the file /etc/lxc/dnsmasq.conf and add the hostname (container name) and desired ip&lt;br /&gt;
&lt;br /&gt;
  dhcp-host=guest1,10.0.3.4&lt;br /&gt;
  dhcp-host=guest2,10.0.3.5&lt;br /&gt;
&lt;br /&gt;
Restart the service&lt;br /&gt;
&lt;br /&gt;
  service dnsmasq.lxcbr0 restart&lt;br /&gt;
&lt;br /&gt;
== Create a guest ==&lt;br /&gt;
&lt;br /&gt;
=== Picking from the list ===&lt;br /&gt;
&lt;br /&gt;
{{Cmd|lxc-create -n guest1 -f /etc/lxc/default.conf -t download}}&lt;br /&gt;
&lt;br /&gt;
And just pick from the list. lxc-download and xz can be uninstalled after you are done.&lt;br /&gt;
&lt;br /&gt;
=== Alpine Template ===&lt;br /&gt;
&lt;br /&gt;
{{Cmd|lxc-create -n guest1 -f /etc/lxc/default.conf -t alpine}}&lt;br /&gt;
&lt;br /&gt;
This will create a &#039;&#039;/var/lib/lxc/guest1&#039;&#039; directory with a &#039;&#039;config&#039;&#039; file and a &#039;&#039;rootfs&#039;&#039; directory.&lt;br /&gt;
&lt;br /&gt;
Note: by default, the alpine template &#039;&#039;&#039;does not have networking service on&#039;&#039;&#039;, you will need to add it using lxc-console&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If running on x64 compatible hardware, it is possible to create a 32bit guest:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|lxc-create -n guest1 -f /etc/lxc/default.conf -t alpine -- --arch x86}}&lt;br /&gt;
&lt;br /&gt;
=== Debian template ===&lt;br /&gt;
&lt;br /&gt;
In order to create a debian template container you&#039;ll need to install some packages:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|apk add debootstrap rsync}}&lt;br /&gt;
&lt;br /&gt;
You&#039;ll need to turn off some grsecurity chroot options otherwise the debootstrap will fail:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|echo 0 &amp;gt; /proc/sys/kernel/grsecurity/chroot_caps&lt;br /&gt;
echo 0 &amp;gt; /proc/sys/kernel/grsecurity/chroot_deny_chroot&lt;br /&gt;
echo 0 &amp;gt; /proc/sys/kernel/grsecurity/chroot_deny_mount&lt;br /&gt;
echo 0 &amp;gt; /proc/sys/kernel/grsecurity/chroot_deny_mknod&lt;br /&gt;
echo 0 &amp;gt; /proc/sys/kernel/grsecurity/chroot_deny_chmod&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Remember to turn them back on, or simply reboot.&lt;br /&gt;
&lt;br /&gt;
Now you can run:&lt;br /&gt;
{{Cmd|SUITE{{=}}wheezy lxc-create -n guest1 -f /etc/lxc/default.conf -t debian}}&lt;br /&gt;
&lt;br /&gt;
==== Setting a static IP  ====&lt;br /&gt;
Since Debian Bullseye 11.3 you can&#039;t assign a static IP address using the lxc config file of the container [https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1009351 because of a systemd change].&lt;br /&gt;
To make it work with a configuration like the following&lt;br /&gt;
&lt;br /&gt;
 # grep net /var/lib/lxc/bullseye/config &lt;br /&gt;
 lxc.net.0.type = veth&lt;br /&gt;
 lxc.net.0.flags = up&lt;br /&gt;
 lxc.net.0.link = virbr1&lt;br /&gt;
 lxc.net.0.ipv4.address = 192.168.1.111/24&lt;br /&gt;
 lxc.net.0.ipv4.gateway = 192.168.1.1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You have to attach to the container and run &lt;br /&gt;
&lt;br /&gt;
{{Cmd|lxc-attach -n bullseye&lt;br /&gt;
systemctl stop systemd-networkd&lt;br /&gt;
systemctl disable systemd-networkd&lt;br /&gt;
reboot&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After the reboot the IP address should be set correctly. This can be confirmed using the lxc-ls command&lt;br /&gt;
&lt;br /&gt;
{{Cmd|# lxc-ls -f&lt;br /&gt;
NAME       STATE   AUTOSTART GROUPS IPV4           IPV6 UNPRIVILEGED        &lt;br /&gt;
bullseye   RUNNING 1         -      192.168.1.111  -    false&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Ubuntu template ===&lt;br /&gt;
&lt;br /&gt;
{{Obsolete|Alpine has not contained grsec for a long time}}&lt;br /&gt;
&lt;br /&gt;
In order to create an ubuntu template container, you&#039;ll need to turn off some grsecurity chroot options:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|echo 0 &amp;gt; /proc/sys/kernel/grsecurity/chroot_caps&lt;br /&gt;
echo 0 &amp;gt; /proc/sys/kernel/grsecurity/chroot_deny_chroot&lt;br /&gt;
echo 0 &amp;gt; /proc/sys/kernel/grsecurity/chroot_deny_mount&lt;br /&gt;
echo 0 &amp;gt; /proc/sys/kernel/grsecurity/chroot_deny_mknod&lt;br /&gt;
echo 0 &amp;gt; /proc/sys/kernel/grsecurity/chroot_deny_chmod&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Remember to turn them back on, or simply reboot.&lt;br /&gt;
&lt;br /&gt;
Now you can run (replace %MIRROR% with the actual hostname, for example: http://us.archive.ubuntu.com/ubuntu/)&lt;br /&gt;
&lt;br /&gt;
{{Cmd|lxc-create -n guest2 -f /etc/lxc/default.conf -t ubuntu -- -r xenial -a amd64 -u user --password secretpassword --mirror $MIRROR  }}&lt;br /&gt;
&lt;br /&gt;
{{Warning|Be sure to set systemd_container to yes in /etc/conf.d/lxc.CONTAINER.  Otherwise, most functionality will be broken}}&lt;br /&gt;
&lt;br /&gt;
=== Unprivileged LXC images (Alpine / Debian / Ubuntu / Centos etc..) ===&lt;br /&gt;
&lt;br /&gt;
To enable unprivileged containers, one must create a uidgid map:&lt;br /&gt;
&lt;br /&gt;
 echo root:1000000:65536 | tee -a /etc/subuid &lt;br /&gt;
 echo root:1000000:65536 | tee -a /etc/subgid&lt;br /&gt;
&lt;br /&gt;
This creates a uid and gid map for the root user starting at 1000000 with a size of 65536.&lt;br /&gt;
&lt;br /&gt;
To configure containers to use this mapping, add the following lines to the configuration:&lt;br /&gt;
&lt;br /&gt;
 lxc.idmap = u 0 1000000 65536&lt;br /&gt;
 lxc.idmap = g 0 1000000 65536&lt;br /&gt;
&lt;br /&gt;
This can be in the global or container-specific configuration.&lt;br /&gt;
&lt;br /&gt;
To create an unprivileged lxc container, you need to use the download template. The download template must be installed:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|apk add gnupg xz lxc-download&lt;br /&gt;
lxc-create -n container-name -t download}}&lt;br /&gt;
choose the Distribution | Release | Architecture.&lt;br /&gt;
&lt;br /&gt;
To be able to log in to a Debian container, you currently need to:&lt;br /&gt;
{{Cmd|rm /lib/systemd/system/container-getty\@.service}}&lt;br /&gt;
&lt;br /&gt;
You can also [https://without-systemd.org/wiki/index_php/How_to_remove_systemd_from_a_Debian_jessie/sid_installation/ remove Systemd from the container].&lt;br /&gt;
&lt;br /&gt;
== Starting/Stopping the guest ==&lt;br /&gt;
&lt;br /&gt;
First, you should enable the cgroup script:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|rc-update add cgroups}}&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t want to reboot, you can start the service by running&lt;br /&gt;
&lt;br /&gt;
{{Cmd|rc-service cgroups start}}&lt;br /&gt;
&lt;br /&gt;
Create a symlink to the &#039;&#039;/etc/init.d/lxc&#039;&#039; script for your guest.&lt;br /&gt;
{{Cmd|ln -s lxc /etc/init.d/lxc.guest1}}&lt;br /&gt;
&lt;br /&gt;
You can start your guest with:&lt;br /&gt;
{{Cmd|/etc/init.d/lxc.guest1 start}}&lt;br /&gt;
&lt;br /&gt;
Stop it with:&lt;br /&gt;
{{Cmd|/etc/init.d/lxc.guest1 stop}}&lt;br /&gt;
&lt;br /&gt;
Make it autostart at boot-up with:&lt;br /&gt;
{{Cmd| rc-update add lxc.guest1}}&lt;br /&gt;
&lt;br /&gt;
You can add to the container config: &amp;lt;code&amp;gt;lxc.start.auto = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Cmd|rc-update add lxc}}&lt;br /&gt;
&lt;br /&gt;
to autostart containers with the lxc service only.&lt;br /&gt;
&lt;br /&gt;
== Connecting to the guest ==&lt;br /&gt;
By default, sshd is not installed. You&#039;ll have to attach to the container or connect to the virtual console. This is done with:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|lxc-attach -n guest1}}&lt;br /&gt;
&lt;br /&gt;
Type exit to detach from the container again (please check the grsec notes above)&lt;br /&gt;
&lt;br /&gt;
== Connect to virtual console ==&lt;br /&gt;
&lt;br /&gt;
{{Cmd|lxc-console -n guest1}}&lt;br /&gt;
&lt;br /&gt;
To disconnect, press {{key|Ctrl}}+{{key|a}} {{key|q}}&lt;br /&gt;
&lt;br /&gt;
== Deleting a guest ==&lt;br /&gt;
Make sure the guest is stopped, then run:&lt;br /&gt;
{{Cmd|lxc-destroy -n guest1}}&lt;br /&gt;
This will erase everything, without asking any questions. It is equivalent to: {{Cmd|rm -r /var/lib/lxc/guest1}}&lt;br /&gt;
&lt;br /&gt;
== Advanced ==&lt;br /&gt;
&lt;br /&gt;
=== Creating a LXC container without modifying your network interfaces ===&lt;br /&gt;
&lt;br /&gt;
The problem with bridging is that the interface you bridge gets replaced with your new bridge interface.&lt;br /&gt;
Let&#039;s say you have interface eth0 that you want to bridge. Your eth0 interface gets replaced with the br0 interface that you create. It also means that the interface you use needs to be placed into promiscuous mode to catch all the traffic that could be destined to the other side of the bridge, which may not be what you want.&lt;br /&gt;
&lt;br /&gt;
The solution is to create a dummy network interface, bridge that, and set up NAT so that traffic out of your bridge interface gets pushed through the interface of your choice.&lt;br /&gt;
&lt;br /&gt;
Let&#039;s create that dummy interface (thanks to ncopa for talking me out of macvlan and pointing out the dummy interface kernel module)&lt;br /&gt;
&lt;br /&gt;
{{Cmd|modprobe dummy}}&lt;br /&gt;
&lt;br /&gt;
This will create a dummy interface called dummy0 on your host. To create this interface on every boot, append &amp;quot;dummy&amp;quot; to /etc/modules:&lt;br /&gt;
&lt;br /&gt;
Now we will create a bridge called br0&lt;br /&gt;
&lt;br /&gt;
{{Cmd |brctl addbr br0&lt;br /&gt;
brctl setfd br0 0 }}&lt;br /&gt;
&lt;br /&gt;
and then make that dummy interface one end of the bridge&lt;br /&gt;
&lt;br /&gt;
{{Cmd | brctl addif br0 dummy0 }}&lt;br /&gt;
&lt;br /&gt;
Next, let&#039;s give that bridged interface a reason to exist:&lt;br /&gt;
&lt;br /&gt;
{{ Cmd | ifconfig br0 192.168.1.1 netmask 255.255.255.0 up}}&lt;br /&gt;
&lt;br /&gt;
Create a file for your container. Let&#039;s say /etc/lxc/bridgenat.conf, with the following settings.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
lxc.net.0.type = veth&lt;br /&gt;
lxc.net.0.flags = up&lt;br /&gt;
lxc.net.0.link = br0&lt;br /&gt;
lxc.net.0.name = eth1&lt;br /&gt;
lxc.net.0.ipv4.address = 192.168.1.2/24 192.168.1.255&lt;br /&gt;
lxc.net.0.ipv4.gateway = 192.168.1.1&lt;br /&gt;
lxc.net.0.veth.pair = veth-if-0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and build your container with that file:&lt;br /&gt;
&lt;br /&gt;
{{ Cmd | lxc-create -n alpine -f /etc/lxc/bridgenat.conf -t alpine }}&lt;br /&gt;
&lt;br /&gt;
You should now be able to ping your container from your host, and your host from your container.&lt;br /&gt;
&lt;br /&gt;
Your container needs to know where to push traffic that isn&#039;t within it&#039;s subnet. To do so, we tell the container to route through the bridge interface, br0&lt;br /&gt;
From inside the container run&lt;br /&gt;
&lt;br /&gt;
{{ Cmd | route add default gw 192.168.1.1 }}&lt;br /&gt;
&lt;br /&gt;
The next step is to push the traffic coming from your private subnet over br0 out through your internet facing interface, or any interface you chose&lt;br /&gt;
&lt;br /&gt;
We are messing with your IP tables here, so make sure these settings don&#039;t conflict with anything you may have already set up.&lt;br /&gt;
&lt;br /&gt;
Say eth0 was your internet facing network interface, and br0 is the name of the bridge you made earlier. We&#039;d do this:&lt;br /&gt;
&lt;br /&gt;
{{ Cmd | echo 1 &amp;gt; /proc/sys/net/ipv4/ip_forward&lt;br /&gt;
iptables --table nat --append POSTROUTING --out-interface eth0 -j MASQUERADE&lt;br /&gt;
iptables --append FORWARD --in-interface br0 -j ACCEPT&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Now you should be able to route through your bridge interface to the internet facing interface of your host from your container, just like at home!&lt;br /&gt;
&lt;br /&gt;
You could also have a dhcp server running on your host, and set it up to give IP addresses from your private subnet to any container that requests it, and then have one template for multiple alpine LXC containers, perfect for alpine development :)&lt;br /&gt;
&lt;br /&gt;
=== Using static IP ===&lt;br /&gt;
&lt;br /&gt;
If you&#039;re using static IP, you need to configure this properly on the guest /etc/network/interfaces. To stay in line with the above example, modify &#039;&#039;/var/lib/lxc/guest1/rootfs/etc/network/interfaces&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
from&lt;br /&gt;
&lt;br /&gt;
 #auto lo&lt;br /&gt;
     iface lo inet loopback&lt;br /&gt;
 auto eth0&lt;br /&gt;
     iface eth0 inet &#039;&#039;&#039;dhcp&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
to &lt;br /&gt;
&lt;br /&gt;
 #auto lo&lt;br /&gt;
     iface lo inet loopback&lt;br /&gt;
 auto eth0&lt;br /&gt;
     iface eth0 inet &#039;&#039;&#039;static&#039;&#039;&#039;&lt;br /&gt;
     address &amp;lt;lxc-container-ip&amp;gt;   # IP which the lxc container should use&lt;br /&gt;
     gateway &amp;lt;gateway-ip&amp;gt;         # IP of gateway to use, mostly same as on lxc-host&lt;br /&gt;
     netmask &amp;lt;netmask&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== mem and swap ===&lt;br /&gt;
&lt;br /&gt;
{{Cmd|vim /boot/extlinux.conf}}&lt;br /&gt;
&lt;br /&gt;
{{Cmd|&lt;br /&gt;
  APPEND initrd{{=}}initramfs-3.10.13-1-grsec root{{=}}UUID{{=}}7cd8789f-5659-40f8-9548-ae8f89c918ab modules{{=}}sd-mod,usb-storage,ext4 quiet cgroup_enable{{=}}memory swapaccount{{=}}1&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== checkconfig ===&lt;br /&gt;
{{Cmd|lxc-checkconfig}}&lt;br /&gt;
&lt;br /&gt;
{{Cmd|&lt;br /&gt;
Kernel configuration not found at /proc/config.gz; searching...&lt;br /&gt;
Kernel configuration found at /boot/config-3.10.13-1-grsec&lt;br /&gt;
--- Namespaces ---&lt;br /&gt;
Namespaces: enabled&lt;br /&gt;
Utsname namespace: enabled&lt;br /&gt;
Ipc namespace: enabled&lt;br /&gt;
Pid namespace: enabled&lt;br /&gt;
User namespace: missing&lt;br /&gt;
Network namespace: enabled&lt;br /&gt;
Multiple /dev/pts instances: enabled&lt;br /&gt;
&lt;br /&gt;
--- Control groups ---&lt;br /&gt;
Cgroup: enabled&lt;br /&gt;
Cgroup clone_children flag: enabled&lt;br /&gt;
Cgroup device: enabled&lt;br /&gt;
Cgroup sched: enabled&lt;br /&gt;
Cgroup cpu account: enabled&lt;br /&gt;
Cgroup memory controller: missing&lt;br /&gt;
Cgroup cpuset: enabled&lt;br /&gt;
&lt;br /&gt;
--- Misc ---&lt;br /&gt;
Veth pair device: enabled&lt;br /&gt;
Macvlan: enabled&lt;br /&gt;
Vlan: enabled&lt;br /&gt;
File capabilities: enabled&lt;br /&gt;
&lt;br /&gt;
Note : Before booting a new kernel, you can check its configuration&lt;br /&gt;
usage : CONFIG{{=}}/path/to/config /usr/bin/lxc-checkconfig&lt;br /&gt;
&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== VirtualBox ===&lt;br /&gt;
&lt;br /&gt;
In order for the network to work on containers, you need to set &amp;quot;Promiscuous Mode&amp;quot; to &amp;quot;Allow All&amp;quot; in VirtualBox settings for the network adapter.&lt;br /&gt;
&lt;br /&gt;
[[File:VirtualBoxNetworkAdapter.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Virtualization]]&lt;br /&gt;
&lt;br /&gt;
=== postgreSQL ===&lt;br /&gt;
&lt;br /&gt;
Inside the container run: {{Cmd|chmod go+w /dev/null}} to fix {{Cmd|rc-service postgresql start}}&lt;br /&gt;
&lt;br /&gt;
=== openVPN ===&lt;br /&gt;
&lt;br /&gt;
see [[Setting_up_a_OpenVPN_server#openVPN_and_LXC]]&lt;br /&gt;
&lt;br /&gt;
== LXC 1.0 Additional information ==&lt;br /&gt;
&lt;br /&gt;
Some info regarding new features in LXC 1.0&lt;br /&gt;
 &lt;br /&gt;
https://www.stgraber.org/2013/12/20/lxc-1-0-blog-post-series/&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Howto-lxc-simple]]&lt;/div&gt;</summary>
		<author><name>Fabricionaweb</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=LXC&amp;diff=24415</id>
		<title>LXC</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=LXC&amp;diff=24415"/>
		<updated>2023-08-24T18:23:16Z</updated>

		<summary type="html">&lt;p&gt;Fabricionaweb: refer to lxc-bridge package to setup host network&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[https://linuxcontainers.org/ Linux Containers (LXC)] provides containers similar to BSD Jails, Linux VServers and Solaris Zones. It gives the impression of virtualization, but shares the kernel and resources with the &amp;quot;host&amp;quot;. You can use lxc directly or through [[LXD]].&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
Install the required packages:&lt;br /&gt;
{{Cmd|apk add lxc bridge lxcfs lxc-download xz}}&lt;br /&gt;
&lt;br /&gt;
If you want to create containers other than Alpine, you&#039;ll need lxc-templates:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|apk add lxc-templates}}&lt;br /&gt;
&lt;br /&gt;
== Upgrading from 2.x ==&lt;br /&gt;
&lt;br /&gt;
Starting with Alpine 3.9, we ship LXC version 3.1.&lt;br /&gt;
LXC 3.x has major changes which can and will break your current setup.&lt;br /&gt;
LXC 3.x will NOT ship with legacy container templates. Check your current container configs to see if you have any includes pointing to files that don&#039;t exist (shipped by legacy templates).&lt;br /&gt;
For example if you use Alpine containers created with the Alpine template, you&#039;ll need to install:&lt;br /&gt;
&lt;br /&gt;
 apk add lxc-templates-legacy-alpine&lt;br /&gt;
&lt;br /&gt;
Also make sure you convert your LXC config files to the new 2.x format (this is now required).&lt;br /&gt;
&lt;br /&gt;
 lxc-update-config -c /var/lib/lxc/container-name/config&lt;br /&gt;
&lt;br /&gt;
Make sure you have removed &#039;&#039;&#039;cgroup_enable&#039;&#039;&#039; from your cmdline as this will fail to mount cgroups and fail LXC service.&lt;br /&gt;
&lt;br /&gt;
== Prepare network on host ==&lt;br /&gt;
Install the {{Pkg|lxc-bridge}} package to create the &amp;lt;code&amp;gt;lxcbr0&amp;lt;/code&amp;gt; bridge and configure the forwarding routes using iptables&lt;br /&gt;
&lt;br /&gt;
 apk add lxc-bridge iptables&lt;br /&gt;
&lt;br /&gt;
Enable the dnsmasq [[OpenRC]] service at boot and start it&lt;br /&gt;
&lt;br /&gt;
 rc-update add dnsmasq.lxcbr0 boot&lt;br /&gt;
 service dnsmasq.lxcbr0 start&lt;br /&gt;
&lt;br /&gt;
If you dont want to forward the routes, add &amp;lt;code&amp;gt;DISABLE_IPTABLES=&amp;quot;yes&amp;quot;&amp;lt;/code&amp;gt; to the &amp;lt;code&amp;gt;/etc/conf.d/dnsmasq.lxcbr0&amp;lt;/code&amp;gt; file&lt;br /&gt;
&lt;br /&gt;
== Create a guest ==&lt;br /&gt;
&lt;br /&gt;
=== Picking from the list ===&lt;br /&gt;
&lt;br /&gt;
{{Cmd|lxc-create -n guest1 -f /etc/lxc/default.conf -t download}}&lt;br /&gt;
&lt;br /&gt;
And just pick from the list. lxc-download and xz can be uninstalled after you are done.&lt;br /&gt;
&lt;br /&gt;
=== Alpine Template ===&lt;br /&gt;
&lt;br /&gt;
{{Cmd|lxc-create -n guest1 -f /etc/lxc/default.conf -t alpine}}&lt;br /&gt;
&lt;br /&gt;
This will create a &#039;&#039;/var/lib/lxc/guest1&#039;&#039; directory with a &#039;&#039;config&#039;&#039; file and a &#039;&#039;rootfs&#039;&#039; directory.&lt;br /&gt;
&lt;br /&gt;
Note: by default, the alpine template &#039;&#039;&#039;does not have networking service on&#039;&#039;&#039;, you will need to add it using lxc-console&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If running on x64 compatible hardware, it is possible to create a 32bit guest:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|lxc-create -n guest1 -f /etc/lxc/default.conf -t alpine -- --arch x86}}&lt;br /&gt;
&lt;br /&gt;
=== Debian template ===&lt;br /&gt;
&lt;br /&gt;
In order to create a debian template container you&#039;ll need to install some packages:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|apk add debootstrap rsync}}&lt;br /&gt;
&lt;br /&gt;
You&#039;ll need to turn off some grsecurity chroot options otherwise the debootstrap will fail:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|echo 0 &amp;gt; /proc/sys/kernel/grsecurity/chroot_caps&lt;br /&gt;
echo 0 &amp;gt; /proc/sys/kernel/grsecurity/chroot_deny_chroot&lt;br /&gt;
echo 0 &amp;gt; /proc/sys/kernel/grsecurity/chroot_deny_mount&lt;br /&gt;
echo 0 &amp;gt; /proc/sys/kernel/grsecurity/chroot_deny_mknod&lt;br /&gt;
echo 0 &amp;gt; /proc/sys/kernel/grsecurity/chroot_deny_chmod&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Remember to turn them back on, or simply reboot.&lt;br /&gt;
&lt;br /&gt;
Now you can run:&lt;br /&gt;
{{Cmd|SUITE{{=}}wheezy lxc-create -n guest1 -f /etc/lxc/default.conf -t debian}}&lt;br /&gt;
&lt;br /&gt;
==== Setting a static IP  ====&lt;br /&gt;
Since Debian Bullseye 11.3 you can&#039;t assign a static IP address using the lxc config file of the container [https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1009351 because of a systemd change].&lt;br /&gt;
To make it work with a configuration like the following&lt;br /&gt;
&lt;br /&gt;
 # grep net /var/lib/lxc/bullseye/config &lt;br /&gt;
 lxc.net.0.type = veth&lt;br /&gt;
 lxc.net.0.flags = up&lt;br /&gt;
 lxc.net.0.link = virbr1&lt;br /&gt;
 lxc.net.0.ipv4.address = 192.168.1.111/24&lt;br /&gt;
 lxc.net.0.ipv4.gateway = 192.168.1.1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You have to attach to the container and run &lt;br /&gt;
&lt;br /&gt;
{{Cmd|lxc-attach -n bullseye&lt;br /&gt;
systemctl stop systemd-networkd&lt;br /&gt;
systemctl disable systemd-networkd&lt;br /&gt;
reboot&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After the reboot the IP address should be set correctly. This can be confirmed using the lxc-ls command&lt;br /&gt;
&lt;br /&gt;
{{Cmd|# lxc-ls -f&lt;br /&gt;
NAME       STATE   AUTOSTART GROUPS IPV4           IPV6 UNPRIVILEGED        &lt;br /&gt;
bullseye   RUNNING 1         -      192.168.1.111  -    false&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Ubuntu template ===&lt;br /&gt;
&lt;br /&gt;
{{Obsolete|Alpine has not contained grsec for a long time}}&lt;br /&gt;
&lt;br /&gt;
In order to create an ubuntu template container, you&#039;ll need to turn off some grsecurity chroot options:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|echo 0 &amp;gt; /proc/sys/kernel/grsecurity/chroot_caps&lt;br /&gt;
echo 0 &amp;gt; /proc/sys/kernel/grsecurity/chroot_deny_chroot&lt;br /&gt;
echo 0 &amp;gt; /proc/sys/kernel/grsecurity/chroot_deny_mount&lt;br /&gt;
echo 0 &amp;gt; /proc/sys/kernel/grsecurity/chroot_deny_mknod&lt;br /&gt;
echo 0 &amp;gt; /proc/sys/kernel/grsecurity/chroot_deny_chmod&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Remember to turn them back on, or simply reboot.&lt;br /&gt;
&lt;br /&gt;
Now you can run (replace %MIRROR% with the actual hostname, for example: http://us.archive.ubuntu.com/ubuntu/)&lt;br /&gt;
&lt;br /&gt;
{{Cmd|lxc-create -n guest2 -f /etc/lxc/default.conf -t ubuntu -- -r xenial -a amd64 -u user --password secretpassword --mirror $MIRROR  }}&lt;br /&gt;
&lt;br /&gt;
{{Warning|Be sure to set systemd_container to yes in /etc/conf.d/lxc.CONTAINER.  Otherwise, most functionality will be broken}}&lt;br /&gt;
&lt;br /&gt;
=== Unprivileged LXC images (Alpine / Debian / Ubuntu / Centos etc..) ===&lt;br /&gt;
&lt;br /&gt;
To enable unprivileged containers, one must create a uidgid map:&lt;br /&gt;
&lt;br /&gt;
 echo root:1000000:65536 | tee -a /etc/subuid &lt;br /&gt;
 echo root:1000000:65536 | tee -a /etc/subgid&lt;br /&gt;
&lt;br /&gt;
This creates a uid and gid map for the root user starting at 1000000 with a size of 65536.&lt;br /&gt;
&lt;br /&gt;
To configure containers to use this mapping, add the following lines to the configuration:&lt;br /&gt;
&lt;br /&gt;
 lxc.idmap = u 0 1000000 65536&lt;br /&gt;
 lxc.idmap = g 0 1000000 65536&lt;br /&gt;
&lt;br /&gt;
This can be in the global or container-specific configuration.&lt;br /&gt;
&lt;br /&gt;
To create an unprivileged lxc container, you need to use the download template. The download template must be installed:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|apk add gnupg xz lxc-download&lt;br /&gt;
lxc-create -n container-name -t download}}&lt;br /&gt;
choose the Distribution | Release | Architecture.&lt;br /&gt;
&lt;br /&gt;
To be able to log in to a Debian container, you currently need to:&lt;br /&gt;
{{Cmd|rm /lib/systemd/system/container-getty\@.service}}&lt;br /&gt;
&lt;br /&gt;
You can also [https://without-systemd.org/wiki/index_php/How_to_remove_systemd_from_a_Debian_jessie/sid_installation/ remove Systemd from the container].&lt;br /&gt;
&lt;br /&gt;
== Starting/Stopping the guest ==&lt;br /&gt;
&lt;br /&gt;
First, you should enable the cgroup script:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|rc-update add cgroups}}&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t want to reboot, you can start the service by running&lt;br /&gt;
&lt;br /&gt;
{{Cmd|rc-service cgroups start}}&lt;br /&gt;
&lt;br /&gt;
Create a symlink to the &#039;&#039;/etc/init.d/lxc&#039;&#039; script for your guest.&lt;br /&gt;
{{Cmd|ln -s lxc /etc/init.d/lxc.guest1}}&lt;br /&gt;
&lt;br /&gt;
You can start your guest with:&lt;br /&gt;
{{Cmd|/etc/init.d/lxc.guest1 start}}&lt;br /&gt;
&lt;br /&gt;
Stop it with:&lt;br /&gt;
{{Cmd|/etc/init.d/lxc.guest1 stop}}&lt;br /&gt;
&lt;br /&gt;
Make it autostart at boot-up with:&lt;br /&gt;
{{Cmd| rc-update add lxc.guest1}}&lt;br /&gt;
&lt;br /&gt;
You can add to the container config: &amp;lt;code&amp;gt;lxc.start.auto = 1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Cmd|rc-update add lxc}}&lt;br /&gt;
&lt;br /&gt;
to autostart containers with the lxc service only.&lt;br /&gt;
&lt;br /&gt;
== Connecting to the guest ==&lt;br /&gt;
By default, sshd is not installed. You&#039;ll have to attach to the container or connect to the virtual console. This is done with:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|lxc-attach -n guest1}}&lt;br /&gt;
&lt;br /&gt;
Type exit to detach from the container again (please check the grsec notes above)&lt;br /&gt;
&lt;br /&gt;
== Connect to virtual console ==&lt;br /&gt;
&lt;br /&gt;
{{Cmd|lxc-console -n guest1}}&lt;br /&gt;
&lt;br /&gt;
To disconnect, press {{key|Ctrl}}+{{key|a}} {{key|q}}&lt;br /&gt;
&lt;br /&gt;
== Deleting a guest ==&lt;br /&gt;
Make sure the guest is stopped, then run:&lt;br /&gt;
{{Cmd|lxc-destroy -n guest1}}&lt;br /&gt;
This will erase everything, without asking any questions. It is equivalent to: {{Cmd|rm -r /var/lib/lxc/guest1}}&lt;br /&gt;
&lt;br /&gt;
== Advanced ==&lt;br /&gt;
&lt;br /&gt;
=== Creating a LXC container without modifying your network interfaces ===&lt;br /&gt;
&lt;br /&gt;
The problem with bridging is that the interface you bridge gets replaced with your new bridge interface.&lt;br /&gt;
Let&#039;s say you have interface eth0 that you want to bridge. Your eth0 interface gets replaced with the br0 interface that you create. It also means that the interface you use needs to be placed into promiscuous mode to catch all the traffic that could be destined to the other side of the bridge, which may not be what you want.&lt;br /&gt;
&lt;br /&gt;
The solution is to create a dummy network interface, bridge that, and set up NAT so that traffic out of your bridge interface gets pushed through the interface of your choice.&lt;br /&gt;
&lt;br /&gt;
Let&#039;s create that dummy interface (thanks to ncopa for talking me out of macvlan and pointing out the dummy interface kernel module)&lt;br /&gt;
&lt;br /&gt;
{{Cmd|modprobe dummy}}&lt;br /&gt;
&lt;br /&gt;
This will create a dummy interface called dummy0 on your host. To create this interface on every boot, append &amp;quot;dummy&amp;quot; to /etc/modules:&lt;br /&gt;
&lt;br /&gt;
Now we will create a bridge called br0&lt;br /&gt;
&lt;br /&gt;
{{Cmd |brctl addbr br0&lt;br /&gt;
brctl setfd br0 0 }}&lt;br /&gt;
&lt;br /&gt;
and then make that dummy interface one end of the bridge&lt;br /&gt;
&lt;br /&gt;
{{Cmd | brctl addif br0 dummy0 }}&lt;br /&gt;
&lt;br /&gt;
Next, let&#039;s give that bridged interface a reason to exist:&lt;br /&gt;
&lt;br /&gt;
{{ Cmd | ifconfig br0 192.168.1.1 netmask 255.255.255.0 up}}&lt;br /&gt;
&lt;br /&gt;
Create a file for your container. Let&#039;s say /etc/lxc/bridgenat.conf, with the following settings.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
lxc.net.0.type = veth&lt;br /&gt;
lxc.net.0.flags = up&lt;br /&gt;
lxc.net.0.link = br0&lt;br /&gt;
lxc.net.0.name = eth1&lt;br /&gt;
lxc.net.0.ipv4.address = 192.168.1.2/24 192.168.1.255&lt;br /&gt;
lxc.net.0.ipv4.gateway = 192.168.1.1&lt;br /&gt;
lxc.net.0.veth.pair = veth-if-0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and build your container with that file:&lt;br /&gt;
&lt;br /&gt;
{{ Cmd | lxc-create -n alpine -f /etc/lxc/bridgenat.conf -t alpine }}&lt;br /&gt;
&lt;br /&gt;
You should now be able to ping your container from your host, and your host from your container.&lt;br /&gt;
&lt;br /&gt;
Your container needs to know where to push traffic that isn&#039;t within it&#039;s subnet. To do so, we tell the container to route through the bridge interface, br0&lt;br /&gt;
From inside the container run&lt;br /&gt;
&lt;br /&gt;
{{ Cmd | route add default gw 192.168.1.1 }}&lt;br /&gt;
&lt;br /&gt;
The next step is to push the traffic coming from your private subnet over br0 out through your internet facing interface, or any interface you chose&lt;br /&gt;
&lt;br /&gt;
We are messing with your IP tables here, so make sure these settings don&#039;t conflict with anything you may have already set up.&lt;br /&gt;
&lt;br /&gt;
Say eth0 was your internet facing network interface, and br0 is the name of the bridge you made earlier. We&#039;d do this:&lt;br /&gt;
&lt;br /&gt;
{{ Cmd | echo 1 &amp;gt; /proc/sys/net/ipv4/ip_forward&lt;br /&gt;
iptables --table nat --append POSTROUTING --out-interface eth0 -j MASQUERADE&lt;br /&gt;
iptables --append FORWARD --in-interface br0 -j ACCEPT&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Now you should be able to route through your bridge interface to the internet facing interface of your host from your container, just like at home!&lt;br /&gt;
&lt;br /&gt;
You could also have a dhcp server running on your host, and set it up to give IP addresses from your private subnet to any container that requests it, and then have one template for multiple alpine LXC containers, perfect for alpine development :)&lt;br /&gt;
&lt;br /&gt;
=== Using static IP ===&lt;br /&gt;
&lt;br /&gt;
If you&#039;re using static IP, you need to configure this properly on the guest /etc/network/interfaces. To stay in line with the above example, modify &#039;&#039;/var/lib/lxc/guest1/rootfs/etc/network/interfaces&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
from&lt;br /&gt;
&lt;br /&gt;
 #auto lo&lt;br /&gt;
     iface lo inet loopback&lt;br /&gt;
 auto eth0&lt;br /&gt;
     iface eth0 inet &#039;&#039;&#039;dhcp&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
to &lt;br /&gt;
&lt;br /&gt;
 #auto lo&lt;br /&gt;
     iface lo inet loopback&lt;br /&gt;
 auto eth0&lt;br /&gt;
     iface eth0 inet &#039;&#039;&#039;static&#039;&#039;&#039;&lt;br /&gt;
     address &amp;lt;lxc-container-ip&amp;gt;   # IP which the lxc container should use&lt;br /&gt;
     gateway &amp;lt;gateway-ip&amp;gt;         # IP of gateway to use, mostly same as on lxc-host&lt;br /&gt;
     netmask &amp;lt;netmask&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== mem and swap ===&lt;br /&gt;
&lt;br /&gt;
{{Cmd|vim /boot/extlinux.conf}}&lt;br /&gt;
&lt;br /&gt;
{{Cmd|&lt;br /&gt;
  APPEND initrd{{=}}initramfs-3.10.13-1-grsec root{{=}}UUID{{=}}7cd8789f-5659-40f8-9548-ae8f89c918ab modules{{=}}sd-mod,usb-storage,ext4 quiet cgroup_enable{{=}}memory swapaccount{{=}}1&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== checkconfig ===&lt;br /&gt;
{{Cmd|lxc-checkconfig}}&lt;br /&gt;
&lt;br /&gt;
{{Cmd|&lt;br /&gt;
Kernel configuration not found at /proc/config.gz; searching...&lt;br /&gt;
Kernel configuration found at /boot/config-3.10.13-1-grsec&lt;br /&gt;
--- Namespaces ---&lt;br /&gt;
Namespaces: enabled&lt;br /&gt;
Utsname namespace: enabled&lt;br /&gt;
Ipc namespace: enabled&lt;br /&gt;
Pid namespace: enabled&lt;br /&gt;
User namespace: missing&lt;br /&gt;
Network namespace: enabled&lt;br /&gt;
Multiple /dev/pts instances: enabled&lt;br /&gt;
&lt;br /&gt;
--- Control groups ---&lt;br /&gt;
Cgroup: enabled&lt;br /&gt;
Cgroup clone_children flag: enabled&lt;br /&gt;
Cgroup device: enabled&lt;br /&gt;
Cgroup sched: enabled&lt;br /&gt;
Cgroup cpu account: enabled&lt;br /&gt;
Cgroup memory controller: missing&lt;br /&gt;
Cgroup cpuset: enabled&lt;br /&gt;
&lt;br /&gt;
--- Misc ---&lt;br /&gt;
Veth pair device: enabled&lt;br /&gt;
Macvlan: enabled&lt;br /&gt;
Vlan: enabled&lt;br /&gt;
File capabilities: enabled&lt;br /&gt;
&lt;br /&gt;
Note : Before booting a new kernel, you can check its configuration&lt;br /&gt;
usage : CONFIG{{=}}/path/to/config /usr/bin/lxc-checkconfig&lt;br /&gt;
&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== VirtualBox ===&lt;br /&gt;
&lt;br /&gt;
In order for the network to work on containers, you need to set &amp;quot;Promiscuous Mode&amp;quot; to &amp;quot;Allow All&amp;quot; in VirtualBox settings for the network adapter.&lt;br /&gt;
&lt;br /&gt;
[[File:VirtualBoxNetworkAdapter.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Virtualization]]&lt;br /&gt;
&lt;br /&gt;
=== postgreSQL ===&lt;br /&gt;
&lt;br /&gt;
Inside the container run: {{Cmd|chmod go+w /dev/null}} to fix {{Cmd|rc-service postgresql start}}&lt;br /&gt;
&lt;br /&gt;
=== openVPN ===&lt;br /&gt;
&lt;br /&gt;
see [[Setting_up_a_OpenVPN_server#openVPN_and_LXC]]&lt;br /&gt;
&lt;br /&gt;
== LXC 1.0 Additional information ==&lt;br /&gt;
&lt;br /&gt;
Some info regarding new features in LXC 1.0&lt;br /&gt;
 &lt;br /&gt;
https://www.stgraber.org/2013/12/20/lxc-1-0-blog-post-series/&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Howto-lxc-simple]]&lt;/div&gt;</summary>
		<author><name>Fabricionaweb</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Docker&amp;diff=24376</id>
		<title>Docker</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Docker&amp;diff=24376"/>
		<updated>2023-08-19T06:54:16Z</updated>

		<summary type="html">&lt;p&gt;Fabricionaweb: fix docker compose package&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Installation ==&lt;br /&gt;
&lt;br /&gt;
The {{Pkg|docker}} package is in the &#039;community&#039; repository. See [[Repositories]] how to add a repository.&lt;br /&gt;
&lt;br /&gt;
 apk add docker&lt;br /&gt;
&lt;br /&gt;
Connecting to the Docker daemon through its socket requires you to add yourself to the `docker` group.&lt;br /&gt;
&lt;br /&gt;
 addgroup username docker&lt;br /&gt;
&lt;br /&gt;
To start the Docker daemon at boot, see [[OpenRC]].&lt;br /&gt;
&lt;br /&gt;
 rc-update add docker default&lt;br /&gt;
 service docker start&lt;br /&gt;
&lt;br /&gt;
=== Docker rootless ===&lt;br /&gt;
&lt;br /&gt;
Docker rootless allows unprivileged users to run the docker daemon and docker containers in user namespaces. This is not the same as dockremap explained in the section below. With dockremap the daemon still runs as root.&lt;br /&gt;
&lt;br /&gt;
This requires the {{Pkg|docker-rootless-extras}} package (available in &amp;lt;code&amp;gt;community&amp;lt;/code&amp;gt;) and enabling &amp;lt;code&amp;gt;cgroups v2&amp;lt;/code&amp;gt;:&lt;br /&gt;
edit /etc/rc.conf and set rc_cgroup_mode to unified. Then start the service on boot:&lt;br /&gt;
&lt;br /&gt;
 rc-update add cgroups&lt;br /&gt;
&lt;br /&gt;
Additionally, the &amp;lt;code&amp;gt;/etc/subuid&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/etc/subgid&amp;lt;/code&amp;gt; files need to be set up as explained in [https://docs.docker.com/engine/security/rootless/ the official documentation].&lt;br /&gt;
&lt;br /&gt;
=== Docker Compose ===&lt;br /&gt;
&lt;br /&gt;
{{Pkg|docker-cli-compose}} is in the &#039;community&#039; repository starting with Alpine Linux 3.15.&lt;br /&gt;
&lt;br /&gt;
 apk add docker-cli-compose&lt;br /&gt;
&lt;br /&gt;
== Isolate containers with a user namespace ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
adduser -SDHs /sbin/nologin dockremap&lt;br /&gt;
addgroup -S dockremap&lt;br /&gt;
echo dockremap:$(cat /etc/passwd|grep dockremap|cut -d: -f3):65536 &amp;gt;&amp;gt; /etc/subuid&lt;br /&gt;
echo dockremap:$(cat /etc/passwd|grep dockremap|cut -d: -f4):65536 &amp;gt;&amp;gt; /etc/subgid&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
add to &#039;&#039;&#039;/etc/docker/daemon.json&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{  &lt;br /&gt;
        &amp;quot;userns-remap&amp;quot;: &amp;quot;dockremap&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;You may also consider these options : &#039;&#039;&#039;&lt;br /&gt;
        &amp;quot;experimental&amp;quot;: false,&lt;br /&gt;
        &amp;quot;live-restore&amp;quot;: true,&lt;br /&gt;
        &amp;quot;ipv6&amp;quot;: false,&lt;br /&gt;
        &amp;quot;icc&amp;quot;: false,&lt;br /&gt;
        &amp;quot;no-new-privileges&amp;quot;: false&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You&#039;ll find all possible configurations here[https://docs.docker.com/engine/reference/commandline/dockerd/#daemon-configuration-file].&lt;br /&gt;
&lt;br /&gt;
== Example: How to install docker from Arch ==&lt;br /&gt;
&lt;br /&gt;
https://wiki.archlinux.org/index.php/Docker&lt;br /&gt;
&lt;br /&gt;
== &amp;quot;WARNING: No {swap,memory} limit support&amp;quot; ==&lt;br /&gt;
&lt;br /&gt;
You might encounter this message when executing &amp;lt;code&amp;gt;docker info&amp;lt;/code&amp;gt;.&lt;br /&gt;
To correct this situation, we have to enable the &amp;lt;code&amp;gt;cgroup_enable=memory swapaccount=1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Alpine 3.8 ====&lt;br /&gt;
It may not have been the case before, but with Alpine 3.8, you must config cgroups properly&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Warning&#039;&#039;&#039;&#039;&#039;: This seems &#039;&#039;not&#039;&#039; to work with Alpine 3.9 and Docker 18.06. Follow the instructions for grub or extlinux below instead.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;echo &amp;quot;cgroup /sys/fs/cgroup cgroup defaults 0 0&amp;quot; &amp;gt;&amp;gt; /etc/fstab&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat &amp;gt;&amp;gt; /etc/cgconfig.conf &amp;lt;&amp;lt;EOF&lt;br /&gt;
mount {&lt;br /&gt;
cpuacct = /cgroup/cpuacct;&lt;br /&gt;
memory = /cgroup/memory;&lt;br /&gt;
devices = /cgroup/devices;&lt;br /&gt;
freezer = /cgroup/freezer;&lt;br /&gt;
net_cls = /cgroup/net_cls;&lt;br /&gt;
blkio = /cgroup/blkio;&lt;br /&gt;
cpuset = /cgroup/cpuset;&lt;br /&gt;
cpu = /cgroup/cpu;&lt;br /&gt;
}&lt;br /&gt;
EOF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Grub ===&lt;br /&gt;
If you use Grub, add the cgroup condition into &amp;lt;code&amp;gt;/etc/default/grub&amp;lt;/code&amp;gt;, then upgrade your grub&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;GRUB_CMDLINE_LINUX_DEFAULT=&amp;quot;... cgroup_enable=memory swapaccount=1&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Extlinux ===&lt;br /&gt;
With Extlinux, you add the cgroup condition, but inside of &amp;lt;code&amp;gt;/etc/update-extlinux.conf&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;default_kernel_opts=&amp;quot;... cgroup_enable=memory swapaccount=1&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
then update the config and reboot&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;update-extlinux&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== How to use docker ==&lt;br /&gt;
&lt;br /&gt;
The best documentation on using Docker and creating containers is at the [https://docs.docker.com/ official docker site].  Adding anything to it here would be redundant.&lt;br /&gt;
&lt;br /&gt;
If you create an account at docker.com, you can browse through user images and learn from the syntax in contributed dockerfiles.&lt;br /&gt;
&lt;br /&gt;
Official Docker image files are denoted on the website by a blue ribbon.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [https://www.erianna.com/creating-a-alpine-linux-repository/ Creating and Hosting an Alpine Linux Package Repository for Docker Packages]&lt;br /&gt;
* [[Running Alpine in a Docker Container]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Virtualization]]&lt;/div&gt;</summary>
		<author><name>Fabricionaweb</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Syslog&amp;diff=23532</id>
		<title>Syslog</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Syslog&amp;diff=23532"/>
		<updated>2023-05-28T11:19:30Z</updated>

		<summary type="html">&lt;p&gt;Fabricionaweb: fix syslog config file - files under /etc/conf.d no longer use extension&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC right}}&lt;br /&gt;
&lt;br /&gt;
Syslog collects log data from multiple programs either to RAM or to a file, and handles log rotation (similar to &amp;lt;code&amp;gt;journald&amp;lt;/code&amp;gt; on systemd-based systems). Alpine installs &amp;lt;code&amp;gt;syslog&amp;lt;/code&amp;gt; as provided by &amp;lt;code&amp;gt;busybox&amp;lt;/code&amp;gt; per default, but it also packages [https://pkgs.alpinelinux.org/packages?name=*syslog* other implementations], such as &amp;lt;code&amp;gt;rsyslog&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;syslog-ng&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== busybox syslog ==&lt;br /&gt;
=== Running syslogd ===&lt;br /&gt;
Depending on how you have installed Alpine, it is already running (check with &amp;lt;code&amp;gt;ps a | grep syslogd&amp;lt;/code&amp;gt;). Otherwise enable it at boot and start it with the following commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# rc-update add syslog boot&lt;br /&gt;
# rc-service syslog start&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configuration ===&lt;br /&gt;
Edit &amp;lt;code&amp;gt;/etc/conf.d/syslog&amp;lt;/code&amp;gt; to change the options used when running &amp;lt;code&amp;gt;syslogd&amp;lt;/code&amp;gt;. All available options can be looked up with &amp;lt;code&amp;gt;syslogd --help&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Reading logs ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# tail -f /var/log/messages&lt;br /&gt;
Shows all messages and follows the log&lt;br /&gt;
# tail -f /var/log/messages | grep ssh&lt;br /&gt;
Only shows SSH related messages, also follows the log&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When &amp;lt;code&amp;gt;-C&amp;lt;/code&amp;gt; is enabled in the configuration:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# logread -f&lt;br /&gt;
# logread -f | grep ssh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Writing logs ===&lt;br /&gt;
Many applications are able to write to the syslog by default (e.g. &amp;lt;code&amp;gt;sshd&amp;lt;/code&amp;gt;). If you wish to write manually to it, use the &amp;lt;code&amp;gt;logger&amp;lt;/code&amp;gt; program.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ logger &amp;quot;hello world&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[category:System Administration]]&lt;/div&gt;</summary>
		<author><name>Fabricionaweb</name></author>
	</entry>
</feed>