시놀로지 NAS에서 Docker Registry 쓰는 방법

사실 대부분의 이미지는 Docker Hub에 올리면 끝이다. 그러나 업무용이거나 개인 프로젝트거나 공중에 공개하고 싶지 않은 도커 이미지가 있을 것이다. 그런 경우에 운영하는 게 Docker Registry이다.

이 글에서 우리는 시놀로지 NAS에서 Docker Registry를 운영하는 방법을 알아보려 한다.

들어가기 전에 아래 사항들이 필요하다.

  1. Docker를 설치할 수 있는 시놀로지 NAS (출처: Synology)
    16-series:     RS18016xs+, RS2416+, RS2416RP+, DS916+, DS716+II, DS716+, DS216+
    15-series:     RC18015xs+, DS3615xs, DS2415+, DS1815+, DS1515+, RS815+, RS815RP+, DS415+
    14-series:     RS3614xs+, RS3614xs, RS3614RPxs, RS2414+, RS2414RP+, RS814+, RS814RP+
    13-series:     DS2413+, RS10613xs+, RS3413xs+, DS1813+, DS1513+, DS713+
    12-series:     DS3612xs, RS3412xs, RS3412RPxs, RS2212+, RS2212RP+, DS1812+, DS1512+, RS812+, RS812RP+, DS412+, DS712+
    11-series:     DS3611xs, DS2411+, RS3411xs, RS3411RPxs, RS2211+, RS2211RP+, DS1511+, DS411+II, DS411+
    10-series:     DS1010+, RS810+, RS810RP+, DS710+
  2. Windows용 Docker Quickstart Terminal (Hyper-V 쓰시면 이 글을 먼저 보세요)
  3. SSH 접속 프로그램
  4. DDNS 주소

우선 NAS에 Docker 패키지를 설치한다.  Docker 패키지는 유틸리티 란을 보면 된다.

Docker를 실행한 뒤, 좌측에서 레지스트리를 클릭한 후 registry를 검색한다.

맨 위의 registry를 더블 클릭한 뒤 맨 밑으로 내려준다. 참고로 latest는 이름과 달리 구버전이므로 절대 선택해서는 안 된다.

이미지에 들어가 registry:(선택한 버전)을 더블클릭한다. 이름을 대충 정하고 5000번 포트를 맘에 드는 포트로 이어준다.

2단계는 그냥 넘기고 요약 단계에서 고급 설정을 누른다. 볼륨에서 적당한 폴더를 /tmp/registry-dev, /tmp/registry/, /var/lib/registry로 이어준다. 버전에 따라 다르므로 셋 중에 하나만 저장 폴더이고 나머지는 꽝이지만 놓치면 데이터가 날아가므로 셋 다 추가하자. 읽기 전용은 필히 풀어주자.

SSH로 접속해 vi /var/packages/Docker/scripts/start-stop-status를 입력한 뒤 /#start docker를 쳐 검색한다.
그 후 i를 눌러 입력 모드로 들어간 뒤 아랫줄에 있는 “${DockerBin}” -d &를
“${DockerBin}” –insecure-registry (내 DDNS 주소):(1단계에서 설정한 로컬 포트) -d &으로 바꾼다.

완료되면 esc키를 눌러 입력 모드를 빠져나온 뒤 :를 누르고 wq를 치고 엔터를 눌러 마무리한다.

SSH에서 작업이 끝나면 패키지 센터에 들어가 Docker를 끄고 켠다.

마지막으로 비디오 형식(컨테이너의 오역이다)에 들어가 설정한 컨테이너를 켜주면 끝이다.

Push한 이미지는 SSH에서만 받을 수 있다. 레지스트리에서 설정을 해 줘도 찾지 못한다.

2 comments on “시놀로지 NAS에서 Docker Registry 쓰는 방법

  1. Sorry, but I don’t really understand what the following means. It seems like a lot of that text has become scrambled. Are you suggesting to change something in the start-stop-status file? What does ‘push’ mean in that context? It’s quite confusing.

    —–
    Connect to NAS with SSH, and push vi /var/packages/Docker/scripts/start-stop-status to open setting file, and push /#start docker to search.
    Then press i to change to insert mode. Change “${DockerBin}” -d &
    To “${DockerBin}” –insecure-registry (My DDNS address):(Port set on Step 1) -d &

    Press ESC key to quit insert mode. Press :wq and enter to close vi.
    —–

  2. Hi – regarding my previous comment. I managed to work around it by configuring my client, but I still think the text might benefit from some rewording.

    Thanks for posting this though – it got my 90% of the way there

Jon에 답글 남기기 응답 취소

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다