Skip to content

Instantly share code, notes, and snippets.

View uncelvel's full-sized avatar

Đặng Xuân Cảnh uncelvel

View GitHub Profile

Modifying an Existing Docker Image

To install a custom package or modify an existing docker image we need to

  1. run a docker a container from the image we wish to modify
  2. modify the docker container
  3. commit the changes to the container as a docker image
  4. test changes made to image

1.) Running a docker container from an image

@uncelvel
uncelvel / ceph_crash_service
Created June 19, 2020 15:26
Crash service
root@hn-cas-proxmox1-10-52:/home/canhdx# ceph -s
cluster:
id: 4d2fb85e-d30e-428d-b5ca-43aef79bbc90
health: HEALTH_WARN
1 daemons have recently crashed
services:
mon: 3 daemons, quorum hn-cas-proxmox1-10-52,hn-cas-proxmox2-10-53,hn-cas-proxmox3-10-54 (age 7m)
mgr: hn-cas-proxmox1-10-52(active, since 7m)
osd: 3 osds: 3 up (since 7m), 3 in (since 11m)
#!/bin/bash
##########
# Script to resize a LVM Partition after extending the underlying disk device. Can be used on physical or virtual machines alike.
# Tested with CentOS6, RHEL6, CentOS7, RHEL7. This script is only intended for MBR partitioned disks and not for GPT.
#
# The script will first resize the partition by changing the partition end sector of the selected partition, and then after a reboot resize the filesystem.
# By default it rescans the SCSI bus to check a change in disk size if the disk was hot-extended, which is easy with VMs, and only then proceeds.
# If the extended disk size is recognized by the OS already, you can force resizing with the -f flag.
#
# It is recommended you backup the boot sector of your disk before as a safety measure with something like the following:
#!/bin/bash
# HOW TO INSTALL
# Run below as root
# cd ~/ && wget -O install_mondorescue.sh https://gist.github.com/KEINOS/a71475750b644b1c26db42870cfbafe5/raw&&chmod 0755 install_mondorescue.sh && ./install_mondorescue.sh
# ---------------------------------
# Set screen width
# ---------------------------------
if [ -n "${TERM}" ]; then width=$(tput cols); else width=20; fi
@uncelvel
uncelvel / gist:b6b02956e9d6768954e47f027eb63da1
Created April 21, 2017 06:31 — forked from kewogc/gist:1d679c6c83977d69106f
HOW TO INSTALL KANNEL ON UBUNTU
~# uname -a
~# lsb_release -a
~# locale-gen en_US
~# locale-gen en_US.UTF-8
~# apt-get -y --force-yes remove ntpdate
~# apt-get -y --force-yes install ntp
~# /etc/init.d/ntp restart
~# dpkg-reconfigure tzdata