copy2 docker image 저장 / 이동 / 로드 1. docker image 저장 $ docker save 이미지이름 > archive.tar 2. tar 파일로 추출된 것 원하는 곳에 복사 3. docker image 로드 $ docker load -i archive.tar # -i: tar 파일로 load 4. 해당 image로 container 실행하기위해 docker-compose.yml 추가 # docker-compose.yml version: '3' services: container_name: # 컨테이너 이름 image: test_image # 위에서 로드한 이미지이름 stdin_open: true # == docker run -i tty: true # == docker run -t volumes: - .:/app # local의 .현재.. 2023. 4. 6. copy - shallow, deep : 깊은복사, 얕은복사 list >>> num_list = [1,2,3,4] # deep copy >>> new_list = num_list[:] >>> new_list2 = list(num_list) set >>> str_set = {'Jane', 'Tim', 'John'} # deep copy >>> new_set = str_set.copy() dict >>> str_dict = {'hi': 'world'} # deep copy >>> new_dict = str_dict.copy() use copy module >>> import copy >>> object = 'other something object' >>> new_obj = copy.copy(object) # shallow copy >>> new_obj2 = copy.. 2020. 8. 19. 이전 1 다음