Alpine: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
Geist (Diskussion | Beiträge) |
Geist (Diskussion | Beiträge) |
||
Zeile 33: | Zeile 33: | ||
===== openssh ===== | ===== openssh ===== | ||
+ | [https://wiki.alpinelinux.org/wiki/Setting_up_a_SSH_server Setting up a SSH server] | ||
$''' apk add openssh --no-cache''' | $''' apk add openssh --no-cache''' | ||
$''' apk add openrc --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 ''' |
Version vom 31. März 2022, 11:10 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
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