0

Docker Common Commands: 101 Part 2

The comprehensive Docker command line reference is located here. However we will cover some basic commands. Image Build an image docker build -rm=true . Install an image docker pull ${IMAGE} List of installed images docker images docker images –tree (tree view) docker images -no-trunc (detailed listing) Remove an image docker rmi ${IMAGE_ID} Remove all untagged images docker rmi $(docker images | grep “^” awk ‘{ print $3 }’) Remove all images docker rm $(docker ps -aq) Container Run a container docker run (many other options on this) List containers docker ps docker ps -a (list all containers) Stop a container… Continue Reading

3

Running the latest kernel CentOS7

I decided to start using the ML kernel for my kvm host for performance gains on my kvm guests. You can easily install the ML or the LT kernels easily on CentOS7 using the ELrepo. kernel-MT – mainline stable kernel kernel-LT – long term support kernel Steps: rpm –import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm yum remove kernel-headers kernel-tools kernel-tools-libs edit /etc/yum.repos.d/elrepo.repo and enable=1 the elrepo-kernel. change the ml to lt to install the long term support kernel. yum install kernel-ml.x86_64 kernel-ml-devel.x86_64 kernel-ml-headers.x86_64 kernel-ml-tools.x86_64 kernel-ml-tools-libs.x86_64 kernel-ml-tools-libs-devel.x86_64 time to get grub settled awk -F’ ‘$1==”menuentry ” {print $2}’ /etc/grub2.cfg it should list all… Continue Reading

0

Reset root password on RHEL/CentOS 7

much have changed since 4/5/6 days since RHEL/CentOS7 uses grub2 to boot. root password recovery is now very different than before. start/reboot the system and on the GRUB2 boot screen press the e key for edit. scroll down to the linux* line (could be linux/linux16/linuxefi) and remove rhgb and quiet and add init=/bin/sh to the end of the line. For some virtual hosts you might have to use rb.break instead of init=/bin/sh. Press CTRL-X to boot the system and it a shell prompt will be presented. Once booted the / filesystem will be in read only mode please issue mount… Continue Reading