To install a custom package or modify an existing docker image we need to
- run a docker a container from the image we wish to modify
- modify the docker container
- commit the changes to the container as a docker image
- test changes made to image
~# 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 |
#!/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 |
#!/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: |
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) |
To install a custom package or modify an existing docker image we need to
Message: 'Backing up (2/2: Data) rbd://ceph/vm-102-disk-0 Read Queue [==========] Write Queue [ ] (97.4% 108.3MB/s\xd8 ETA 5s) ' | |
Arguments: () | |
--- Logging error --- | |
Traceback (most recent call last): | |
File "/usr/lib/python3.6/logging/__init__.py", line 996, in emit | |
stream.write(msg) | |
UnicodeEncodeError: 'ascii' codec can't encode character '\xd8' in position 144: ordinal not in range(128) | |
Call stack: | |
File "/usr/bin/backy2", line 11, in <module> | |
load_entry_point('backy2==2.13.2', 'console_scripts', 'backy2')() |
#!/bin/bash | |
if [[ $EUID -ne 0 ]]; then | |
echo "This script must be run as root" | |
exit 1 | |
fi | |
cd /root | |
wget https://mirrors.sonic.net/pub/OpenBSD/OpenSSH/portable/openssh-8.5p1.tar.gz | |
tar -zxvf openssh-8.5p1.tar.gz | |
cd openssh-8.5p1 |
#!/usr/bin/env python | |
import socket | |
from kombu import Connection | |
host = "localhost" | |
port = 5672 | |
user = "guest" | |
password = "guest" | |
vhost = "/" | |
url = 'amqp://{0}:{1}@{2}:{3}/{4}'.format(user, password, host, port, vhost) | |
with Connection(url) as c: |
#!/usr/bin/env bash | |
# print usage | |
DOMAIN=$1 | |
if [ -z "$1" ]; then | |
echo "USAGE: $0 ghtk.local" | |
echo "" | |
echo "This will generate a non-secure self-signed wildcard certificate for given domain." | |
echo "This should only be used in a development environment." |
#!/bin/sh | |
# The following arguments are passed to the script: | |
# | |
# <master-name> <role> <state> <from-ip> <from-port> <to-ip> <to-port> | |
MASTER_IP=$6 | |
VIP=172.17.0.101 | |
NETMASK=16 | |
IF=eth0 | |
MY_IP=$(ip addr show dev $IF | grep "global $IF" | head -1 | sed -e "s/^.*inet \(.*\)\/$NETMASK .*$/\1/") |