Alpine: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
Geist (Diskussion | Beiträge) |
Geist (Diskussion | Beiträge) (→openrc) |
||
(5 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt) | |||
Zeile 1: | Zeile 1: | ||
===== apk command ===== | ===== apk command ===== | ||
+ | [https://wiki.alpinelinux.org/wiki/Package_management Package management] | ||
$''' apk update''' | $''' apk update''' | ||
$''' apk upgrade''' | $''' apk upgrade''' | ||
+ | $''' apk search [PACKAGE]''' | ||
− | + | ===== add user|group===== | |
− | |||
− | |||
− | ===== | ||
[https://wiki.alpinelinux.org/wiki/Setting_up_a_new_user Setting up a new user] | [https://wiki.alpinelinux.org/wiki/Setting_up_a_new_user Setting up a new user] | ||
$''' addgroup -S mygroup ''' | $''' addgroup -S mygroup ''' | ||
Zeile 28: | Zeile 27: | ||
===== openrc ===== | ===== openrc ===== | ||
+ | [https://www.cyberciti.biz/faq/how-to-enable-and-start-services-on-alpine-linux/ How to enable and start services on Alpine Linux] | ||
''rc-update is part of openrc'' | ''rc-update is part of openrc'' | ||
$''' apk add openrc ''' | $''' apk add openrc ''' | ||
$''' rc-status --list''' | $''' rc-status --list''' | ||
+ | $''' touch /run/openrc/softlevel''' | ||
− | $''' | + | ===== openssh ===== |
+ | [https://wiki.alpinelinux.org/wiki/Setting_up_a_SSH_server Setting up a SSH server] | ||
+ | $''' apk add openssh --no-cache''' | ||
+ | $''' apk add openrc --no-cache''' | ||
+ | ''Enable the sshd service at boot time: '' | ||
+ | $''' rc-update add sshd ''' | ||
+ | ''Start the SSHD service on Alpine Linux immediately using the service command: '' | ||
+ | $''' service sshd start ''' |
Aktuelle Version vom 31. März 2022, 13:21 Uhr
Inhaltsverzeichnis
apk command
$ apk update $ apk upgrade $ apk search [PACKAGE]
add user|group
$ addgroup -S mygroup $ adduser -S myuser -G mygroup docker all future commands should run as the myuser user $ USER myuser
How do I add a user when I'm using Alpine as a base image?
The flags for adduser are: Usage: adduser [OPTIONS] USER [GROUP] Create new user, or add USER to GROUP -h DIR Home directory -g GECOS GECOS field -s SHELL Login shell -G GRP Group -S Create a system user -D Don't assign a password -H Don't create home directory -u UID User id -k SKEL Skeleton directory (/etc/skel)
openrc
How to enable and start services on Alpine Linux rc-update is part of openrc $ apk add openrc $ rc-status --list $ touch /run/openrc/softlevel
openssh
Setting up a SSH server $ apk add openssh --no-cache $ apk add openrc --no-cache Enable the sshd service at boot time: $ rc-update add sshd Start the SSHD service on Alpine Linux immediately using the service command: $ service sshd start