Here's how to save and load docker images:
Example scenario: To save a docker image from a docker repository and save it as a tar file locally.
- Save the image as a tarball
docker save repositoryname:tag > repotag.tar
- Zip the image
| ;; Monty Hall problem (Let's Make a Deal gameshow) | |
| ;; http://www.marilynvossavant.com/articles/gameshow.html | |
| (use '(incanter core stats charts)) | |
| ;; set a simulation sample size | |
| (def n 10000) | |
| ;; generate samples of initial-guesses, prize-doors, and switch decisions | |
| (def initial-guesses (sample [1 2 3] :size n)) | |
| (def prize-doors (sample [1 2 3] :size n)) |
| kern.ostype = Darwin | |
| kern.osrelease = 10.6.0 | |
| kern.osrevision = 199506 | |
| kern.version = Darwin Kernel Version 10.6.0: Wed Nov 10 18:13:17 PST 2010; root:xnu-1504.9.26~3/RELEASE_I386 | |
| kern.maxvnodes = 132096 | |
| kern.maxproc = 532 | |
| kern.maxfiles = 12288 | |
| kern.argmax = 262144 | |
| kern.securelevel = 0 | |
| kern.hostname = taquito.local |
| // | |
| // NSImage+OpenCV.h | |
| // | |
| #import <AppKit/AppKit.h> | |
| @interface NSImage (NSImage_OpenCV) { | |
| } |
Here's how to save and load docker images:
Example scenario: To save a docker image from a docker repository and save it as a tar file locally.
docker save repositoryname:tag > repotag.tar
| 1. Add Copy File build phase, Destination: Wrapper, Subpath: Contents/Library/LaunchServices, Codesign on Copy:Disable. | |
| 2. Modify Info.plist for Both target: | |
| 2.1 Add "Tools owned after installation" in App's Info.plist, value is: identifier "<helper's bundle identifier>" and anchor apple generic and certificate leaf[subject.CN] = "<Certificate Name>" and certificate 1[field.1.2.840.113635.100.6.2.1] /* exists */ | |
| 2.2 Add "Clients allowed to add and remove tool" in Helper's Info.plist, it is a array, so item 0's value is: identifier "<app's bundle identifier>" and anchor apple generic and certificate leaf[subject.CN] = "<Certificate Name>" and certificate 1[field.1.2.840.113635.100.6.2.1] /* exists */ | |
| 2.3 Make sure each .plist file is set as Info.plist in Target's Build settings. |
_________ _____ _______________ _____
\_ ___ \\ \\___________ \____ / ____\ ~/.bash/cliref.md
/ \ \/| | | || _/ __ \ __\ copy/paste from whatisdb
\ \___|__ |_|_ || | \ __/|_ | http://pastebin.com/yGmGiDQX
\________ /_____ \_||____|_ /____ /_| [email protected]
20160515 \/ 1527 \/ \/ \/
alias CLIRef.txt='curl -s "http://pastebin.com/raw/yGmGiDQX" | less -i'
| # 1. Backup image tags to text file. | |
| # $ docker images --format "{{.Repository}}:{{.Tag}} {{.ID}}" > img_id.txt | |
| # | |
| # 2. Execute clean-docker-for-mac script | |
| # $ bash clean-docker-for-mac.sh $(docker images --format "{{.ID}}" | xargs) | |
| # | |
| # source: https://gist.github.com/MrTrustor/e690ba75cefe844086f5e7da909b35ce#file-clean-docker-for-mac-sh | |
| # | |
| # 3. Execute this script to restore tags from text file. |
A curated list of my GitHub stars! Generated by starred
| ### if Xcode starts misbehaving you can use: | |
| defaults delete com.apple.dt.Xcode | |
| rm -rf $HOME/Library/Application Support/Developer/Shared/Xcode | |
| rm -rf $HOME/Library/Saved\ Application\ State/com.apple.dt.Xcode.savedState | |
| rm -rf $HOME/Library/Preferences/com.apple.dt.Xcode.* | |
| ### and for the simulators | |
| xcrun simctl erase all |