Aktualisierungen von April, 2017 Kommentarverlauf ein-/ausschalten | Tastaturkürzel

  • Andreas 14:43 am 22. April 2017 permalink
    Tags: alpine, docker,   

    Docker: add new user in Alpine Linux 

    If you want to create a new user within a Dockerfile for an Alpine Linux, useradd won’t work. You have to use adduser.
    This command will work
    adduser -h /home/userx -g groupx -S userx

    Please mind to add the -S (uppercase!!). If you omit this, Alpine ask interactively for a password. Interestingly, the option --disabled-password does not work!?!?

     
  • Andreas 14:09 am 22. April 2017 permalink  

    Untar to a specific target directory 

    tar xvf /opt/metricbeat.tar.gz -C /opt/metricbeat --strip-components=1
    If the tar-file already contains a directory, you have to add –strip-components=1. Otherwise the directory contained in the tar files is created. Also mind that the directory used for -C has to exist beforehand.

     
  • Andreas 14:08 am 7. April 2017 permalink  

    Docker: essential commands for cleaning up 

    Remove all unused images
    docker images –no-trunc | grep ‚‚ | awk ‚{ print $3 }‘ | xargs -r docker rmi
    Remove all activate containers:
    docker rm $(docker ps -a -q -f status=exited) docker stop $(docker ps -a -q) docker rm $(docker ps -a -q)

     
c
Neuen Beitrag erstellen
j
nächster Beitrag/nächster Kommentar
k
vorheriger Beitrag/vorheriger Kommentar
r
Antwort
e
Bearbeiten
o
zeige/verstecke Kommentare
t
Zum Anfang gehen
l
zum Login
h
Zeige/Verberge Hilfe
Shift + Esc
Abbrechen