Skip to content

Instantly share code, notes, and snippets.

View evantobin's full-sized avatar
🤠
javascript

Evan Tobin evantobin

🤠
javascript
View GitHub Profile
@evantobin
evantobin / docker-save-and-retag.sh
Last active March 9, 2023 23:40 — forked from stefanvangastel/docker-load-and-push.sh
Push all local images to repo
#!/bin/bash
#### Functions ###
display_usage() {
echo "This script must be run with Docker capable privileges!"
echo -e "\nUsage:\n$0 <image> <save_to_file> [retag_name] \n"
echo -e " <image>\t\t\tThe image to pull"
echo -e " <save_to_file>\t\t\tFilename to save the image to"
echo -e " [retag_name]\t\t\t(Optional) new name (tag) for image"
echo -e "\nExample: $0 mysql/mysql-server:latest /mydir/mysql.tar my.private.registry/mysql/mysql-server:latest"