3/21/2020

transfer local docker image to another machine


Transfer docker image A -> B
1. Make zip file on A 
docker save -o ./example.tar image_name

2. Transfer example.tar  A to B using scp, rsync, or in some way

3. Load image on B
docker load -i ./example.tar

install docker on ubuntu 18.04

Step 1: Update Software Repositories
sudo apt-get update

Step 2: Uninstall Old Versions of Docker
sudo apt-get remove docker docker-engine docker.io

Step 3: Install Docker
sudo apt install docker.io

Step 4: Start and Automate Docker
sudo systemctl start docker
sudo systemctl enable docker

Step 5 (Optional): Check Docker Version
docker --version

3/17/2020

get unique value from list (python source code)

..
import numpy as np

def unique(list1):
x = np.array(list1)
x = np.unique(x)
return list(x)

list1 = [10, 20, 10, 30, 40, 40]
list1 = unique(list1)
print(list1)
..
output
[10, 20, 30, 40]
..