Skip to content

Instantly share code, notes, and snippets.

View sayan3296's full-sized avatar

Sayan Das sayan3296

  • Red Hat Inc.
  • Pune, India
  • 20:54 (UTC +05:30)
View GitHub Profile
@sayan3296
sayan3296 / docker_images.sh
Created September 4, 2022 10:57 — forked from hydra1983/docker_images.sh
Save and load docker images in batch
#!/bin/bash
readonly DB_FILE="$(pwd)/images.db"
readonly IMG_DIR="$(pwd)/images"
save-images() {
echo "Create ${DB_FILE}"
echo "$(docker images|grep -v 'IMAGE ID'|awk '{printf("%s %s %s\n", $1, $2, $3)}'|column -t)" > "${DB_FILE}"
echo "Read ${DB_FILE}"
@sayan3296
sayan3296 / save-all-images.sh
Created September 4, 2022 10:56 — forked from lalyos/save-all-images.sh
script to save all docker image, and load them back
reload() {
source ${BASH_SOURCE[0]}
}
alias r=reload
get-image-field() {
local imageId=$1
local field=$2
: ${imageId:? reuired}
@sayan3296
sayan3296 / gist:53244ef7084c15041d8804bdce5a6e7a
Created June 3, 2022 07:43 — forked from mccun934/gist:b25876d81d8940be1f758370b84b4e30
Sequel::Migrator::Error: More than 1 row in migrator table
# foreman-rake db:migrate --trace
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
TABLE dynflow_schema_info
rake aborted!
Sequel::Migrator::Error: More than 1 row in migrator table
/opt/theforeman/tfm/root/usr/share/gems/gems/sequel-4.20.0/lib/sequel/extensions/migration.rb:590:in `schema_dataset'
/opt/theforeman/tfm/root/usr/share/gems/gems/sequel-4.20.0/lib/sequel/extensions/migration.rb:444:in `initialize'