12/28/2021

Gentoo Docker

91

Yesterday I successfully installed Gentoo, got my nvidia card and sound working properly etc. But how do I get Lutris or Docker to run properly in Gentoo? I don't see anyway to add lib32s in my Gentoo and Docker doesn't pick my nvidia card up either sadly. Install and configure Docker emerge -ask-verbose app-emulation/docker. Add your user to the docker group. Usermod -aG docker If you want to add Docker to start with OpenRC. Rc-update add docker default. If you do not want it to start together with the system, to use Docker you will always have to start it manually: rc-service.

< Install
English • ‎español • ‎français • ‎한국어 • ‎polski • ‎português do Brasil • ‎русский • ‎Türkçe • ‎中文(中国大陆)‎ • ‎中文(台灣)‎

The Docker daemon pulled the 'hello-world' image from the Docker Hub. The Docker daemon created a new container from that image which runs the executable that produces the output you are currently reading. The Docker daemon streamed that output to the Docker client, which sent it to your terminal.

Welcome to Funtoo Linux! This document was written to help you install Funtoo Linux on PC-compatible systems, while keeping distracting options regarding system configuration to a minimum.

If you've had previous experience installing Gentoo Linux then a lot of steps will be familiar, but you should still read through as there are a few differences. If you're new to installing a Gentoo-based Linux, or new to Linux entirely -- welcome! We have attempted to make these installation instructions understandable to new users as well.

Before we get started, please review the following important information:

Our desktop environment stages (GNOME, Cinnamon, etc.) now support seamless installation on VMware Workstation Pro virtual machines. We highly recommend you enable 3D Accelerated Video for your VM, which is not enabled by default. Click here for more info.
Current Release
The current release of Funtoo Linux is 1.4, sometimes referred to as 1.4-release or 1.4-release-std.
Development Model
Funtoo Linux is a community-developed Linux meta-distribution. If you use Funtoo Linux, you are welcome to contribute to its development via code.funtoo.org without going through any special procedure or complicated approval process. See Development Guide for more information on how to contribute to Funtoo. We also have YouTube video tutorials to help you get started.
Documentation Styles
We also offer the ability to view the install instructions as a single page, suitable for printing.
Release Notes
To familiarize yourself with the latest changes in Funtoo Linux, Release Notes for Funtoo Linux 1.4 are available.
Upgrade Instructions
If upgrading from Funtoo Linux 1.3 or earlier, please consult Funtoo Linux 1.4 Upgrade Instructions.
AWS and Docker Images
We now offer direct deployment of Docker images as well as Funtoo Linux in Amazon Web Services. This is a useful option for those who wish to take advantage of AWS or deploy Funtoo Linux automatically. A tutorial-style guide on how to use AWS with Funtoo is available.
Running Steam
We have recently released official Steam Docker Images as well as support for Steam on Flatpak -- these are the officially-supported way to run Steam on Funtoo. See Steam for more information.
Containers
LXD container management as well as Docker is officially supported. Please see Chroot and Containers for an incomplete but growing list of container technologies available, along with links to further documentation.
New Fchroot Tool
Our new fchroot tool is now available to allow you to run ARM and RISCV environments on PC-compatible hardware. This is a very effective tool for accelerating building of large pieces of software on resource-constrained ARM systems. See the code.funtoo.org page, Frankenchroot and Frankenchroot/Live_NFS_Frankenchroot for set-up information.

Now that we've covered all that important information, it's time to get started installing Funtoo Linux!

Installation Overview

This is a basic overview of the Funtoo installation process:

  1. Download and boot the live CD of your choice.
  2. Prepare your disk.
  3. MBR Partitioning.
  4. GPT Partitioning.
  5. Create and mount filesystems.
  6. Setting the Date.
  7. Install the Funtoo stage tarball of your choice.
  8. Chroot into your new system.
  9. Download the Portage tree.
  10. Configure your system.
  11. Introducing Portage.
  12. Install a kernel.
  13. Install a bootloader.
  14. Configure the Network.
  15. Complete final steps.
  16. Profile Configuration.
Install Guide, Chapter 0Next >
Retrieved from 'https://www.funtoo.org/index.php?title=Install/Introduction&oldid=35004'

There are several ways to get asciinema recorder:

If you use other operating system and you can build a native package for it thendon’t hesitate, do it and let us know. We have Githubissue where we track newreleases and packaging progress.

  • Running in Docker container. Asciinema Docker image is based on Ubuntu 16.04 and has the latest version of asciinema recorder pre-installed. Docker pull asciinema/asciinema. When running it don’t forget to allocate a pseudo-TTY (-t), keep STDIN open (-i) and mount config directory volume (-v).
  • Running in Docker container. Asciinema Docker image is based on Ubuntu 16.04 and has the latest version of asciinema recorder pre-installed. Docker pull asciinema/asciinema. When running it don’t forget to allocate a pseudo-TTY (-t), keep STDIN open (-i) and mount config directory volume (-v).
  • Manually creating the file¶. To manually create the file, simply use your text editor to create the file config.inc.php (you can copy config.sample.inc.php to get a minimal configuration file) in the main (top-level) phpMyAdmin directory (the one that contains index.php). PhpMyAdmin first loads libraries/config.default.php and then overrides those values with anything found in config.inc.php.
  • Run our official Docker images, prepackaged with varied language combinations. To fine-tune Unit to your goals, download the sources, install the toolchain, and build a custom binary from scratch; just make sure you know what you’re doing.

Installing via Pip

Docker originally used aufs for container filesystem layers. It is still available as one of the storage backends but is deprecated in favour of the overlay2 backend which uses OverlayFS. Several Linux distributions have chosen aufs as a replacement for UnionFS, including.

asciinema is available on PyPI and canbe installed with pip (Python 3 required):

This is the universal installation method for all operating systems, whichalways provides the latest version.

Installing on Linux

Arch Linux

Debian

Fedora

For Fedora < 22:

For Fedora >= 22:

Gentoo Linux

NixOS / Nix

openSUSE

Ubuntu

Installing on macOS

Homebrew

MacPorts

Nix

Installing on FreeBSD

Ports

Packages

Installing on OpenBSD

Running in Docker container

asciinema Docker image is based on Ubuntu 16.04 and has the latest version ofasciinema recorder pre-installed.

When running it don’t forget to allocate a pseudo-TTY (-t), keep STDIN open(-i) and mount config directory volume (-v):

Default command run in a container is asciinema rec.

There’s not much software installed in this image though. In most cases you maywant to install extra programs before recording. One option is to derive newimage from this one (start your custom Dockerfile with FROM asciinema/asciinema). Another option is to start the container with /bin/bashas the command, install extra packages and manually start asciinema rec:

Running from source

If none of the above works for you (or you want to help with development) justclone the repo and run latest version of asciinema straight from the masterbranch:

Package information
This article has some todo items:

OpenRC is a dependency-based init system that maintains compatibility with the system provided init program, normally located in /sbin/init. It is Gentoo's native init system, although other systems are available.

OpenRC does not function as a replacement for the /sbin/init file by default and is 100% compatible with Gentoo init scripts. This means a solution can be found to run the dozens of daemons in the Gentoo ebuild repository.

OpenRC is not designed to be exclusively used by Gentoo Linux and is deployed other Linux distributions and BSD systems.

Features

OpenRC provides a number of features touted as innovative by recent init systems like systemd or upstart (wikipedia), such as:

  • cgroups support.
  • Process supervision.
  • Parallel startup of services.
  • Hardware initiated initscripts.

It does this without requiring large layout changes to accommodate radically different designs and dependencies.

Tip
See the comparison of init systems article for more information on init systems.

OpenRC Busybox integration

Busybox can be used to replace most of the userspace utilities needed by OpenRC (init, shell, awk, and other POSIX tools), by using a complete Busybox as shell for OpenRC all the calls that normally would cause a fork/exec would be spared, improving the overall speed. This process is not yet streamlined.

Please note that there are currently many Busybox applets that are incompatible with OpenRC. See bug #529086 for details.

Replacing init

In order to set a specific runlevel from the bootloader the variable softlevel= should be used.

busybox

The SysV-init /etc/inittab file provided by Gentoo is not compatible with the Busybox init.

FILE/etc/inittabExample inittab compatible with Busybox init

openrc-init

OpenRC has its own init system called openrc-init. See OpenRC/openrc-init for details.

Daemon supervision

OpenRC has its own process supervisor. See OpenRC/supervise-daemon for details.
Alternatively Skarnet's S6 is also supported by OpenRC. See S6 for details.

Busybox specific init.d files

TODO: busybox provides a number of applets that could be used to replace third party software like acpid or dhcp/dhcpcd.

Replacing udev with mdev

See mdev.

Replacing udev with eudev

Older Gentoo installs were using udev as the main virtual/udev provider. Based on bug #575718 it was changed to eudev. However, the rc service is still /etc/init.d/udev.

Configuration

Files

/etc/rc.conf
The global OpenRC configuration file.

Logging

OpenRC doesn't log anything by default. To log OpenRC's output during boot, uncomment and set the rc_logger option in /etc/rc.conf. The log will be saved at /var/log/rc.log by default.

Network management

OpenRC can be used with one of several network managers or even with none. By default in Gentoo's OpenRC profilesnetifrc scripts are utilized to manage network connections.

See the Network manager article for a list of options on network management.

Dependency behavior

Changing the default dependencies of init scripts, might be needed to fit more complex setups. See /etc/rc.conf for how to change the default behavior; notice the rc_depend_strict option. In addition, next networking examples show how flexible OpenRC can be.

Multiple network interfaces (example)

The SSH service must come up with the internal network, for instance eth0 and never wlan0.

Gentoo

Overrule the 'net' dependency from /etc/init.d/sshd, and refine it to depend on 'net.eth0':

Multiple network interfaces in multiple runlevels (example)

The SSH service must start with eth0 (not wlan0) in 'default' runlevel, but in 'office' runlevel it must start with wlan0 (not eth0).

Keep the default:

Make additional symlinks to sshd with the network interface names:

root #ln -s sshd /etc/init.d/sshd.wlan0

Settings are read from /etc/conf.d/sshd.eth0 and /etc/conf.d/sshd.wlan0 now:

Add the dependencies:

root #echo 'rc_need='!net net.eth0' >> /etc/conf.d/sshd.eth0
root #echo 'rc_need='!net net.wlan0' >> /etc/conf.d/sshd.wlan0

In this example net.eth0 and net.wlan0 read their settings from /etc/conf.d/net, or /etc/conf.d/net.office depending on the active runlevel. Add all runscripts to the different runlevels:

root #rc-update add net.wlan0 default office
Gentoo

To switch between 'default' runlevel and 'office' runlevel without rebooting the computer, change to 'nonetwork' runlevel in between. The network interfaces will be stopped this way, and re-read their runlevel specific configuration. This works best when 'nonetwork' is a stacked runlevel in both the 'default' and 'office' runlevels, and the display manager and other non-network services are added to the 'nonetwork' runlevel only.

Gentoo Docker Systemd

Selecting a specific runlevel at boot

OpenRC reads the kernel command-line used at boot time, and will start the runlevel specified by the 'softlevel' parameter if provided, instead of 'default'.

Gentoo Docker Image

For instance, you can choose whether to boot into the 'default' or 'nonetwork' runlevels with the following example grub.conf configuration:

FILE/boot/grub/grub.confExample grub.conf (GRUB Legacy)

Usage

Runlevels

OpenRC can be controlled and configured using openrc, rc-update and rc-status commands.

Delete a service from default runlevel, where <service> is the name of the service to be removed:

Listing

Listing commands do not need to be ran as root.

Use rc-update show -v to display all available init scripts and their current runlevel (if they have been added to one):

Running rc-update or rc-update show will display only the init scripts that have been added to a runlevel.

Alternatively, the rc-status command can be used with the --servicelist (-s) option to view the state of all services:

Named runlevels

OpenRC runlevels are directories living in /etc/runlevels to create additional runlevels is enough to issue:

Stacked runlevels

Is possible manage variants using rc-update -s.

Docker

An usage example for using stacked runlevel on laptop to group networking services based on location is at OpenRC/StackedRunlevel.

Docker Gentoo Tutorial

Prefix

Gentoo Prefix installs Gentoo within an offset, known as a prefix, allowing users to install Gentoo in another location in the filesystem hierarchy, hence avoiding conflicts. Next to this offset, Gentoo Prefix runs unprivileged, meaning no root user or rights are required to use it.

By using an offset (the 'prefix' location), it is possible for many 'alternative' user groups to benefit from a large part of the packages in the Gentoo Linux Portage tree. Currently users of the following systems successfully run Gentoo Prefix: Mac OS X on PPC and x86, Linux on x86, x86_64 and ia64, Solaris 10 on Sparc, Sparc/64, x86 and x86_64, FreeBSD on x86, AIX on PPC, Interix on x86, Windows on x86 (with the help of Interix), HP-UX on PARISC and ia64.

OpenRC runscript already support prefix-installed daemons, during the Summer of Code 2012 work will be done to implement full secondary/session daemon behavior to complete the overall feature set provided by Prefix.

OpenRC/Prefix, a tutorial for trying it out.

Hotplug

OpenRC can be triggered by external events, such as new hardware from udev. See OpenRC/Event driven subarticle for details.

Manually recovering crashed services

If you have a process that crashes upon start you will see the following when you go to check it's status.

Docker Gentoo Ebuild

To remedy this situation you will need to zap the process which in the following example is the docker service.

Automatic respawning crashed services

OpenRC can return state of services to runlevel setting state, to provide stateful init scripts and automatic respawning. What you need is to run openrc (for default runlevel). Crashed services start and manual run services will stop. To prevent this you can run openrc -n (--not-stop)

By default openrc will attempt just to start crashed services, not restart. This сontrolled by rc_crashed_stop (default NO) and rc_crashed_start (default YES) options in /etc/rc.conf.

CGroups support

Gentoo Docker Windows

OpenRC starting with version 0.12 has extended cgroups support. See OpenRC/CGroups for details.

Chroot support

Gentoo Docker Command

root #ln -s /lib64/rc/init.d /run/openrc
  • Most Viewed News

    • Run Debian In Docker
    • Tomb Raider For Mac Torrent
    • Plex Docker Setup