Category: Docker

  • Samba v3

    스캐너 데모 과정에서 samba 공유 폴더가 필요하게 되었다. 처음에는 급하게 준비한다고 TrueNAS를 가져 와서 이용했다. 2번째 장비 데모에서는 시간 여유가 있어 컨테이너를 이용할 수 있었다.

    첫 장비에서 필수 조건이 v3 이어서 여기에 버전을 맞추었다.

    사전에 해두어야 할 가장 중요한 설정은 volume의 ./shared_data 폴더의 속성을 777로 변경하는 것이다.

    services:
      samba:
        image: dperson/samba
        container_name: samba
        environment:
          - TZ=Asia/Seoul
        ports:
          - "139:139"
          - "445:445"
        volumes:
          - ./shared_data:/mount
        command:
          # 사용자 계정 및 비밀번호 설정
          - "-u"
          - "byun1114;1"
          # 공유 폴더 설정 (이름;경로;탐색허용;읽기전용;게스트허용;접근가능사용자)
          - "-s"
          - "share;/mount;yes;no;no;byun1114"
          # SMB v3 전용으로 강제 (최소/최대 버전을 모두 SMB3로 고정)
          - "-g"
          - "server min protocol = SMB3"
          - "-g"
          - "server max protocol = SMB3"
        restart: unless-stopped
    
  • 컨테이너 진입

    docker exec -it <컨테이너> /bin/bash

    특정 컨테이너 내부를 살펴 봐야 할 경우가 있다. 이럴 때 이용하면 된다.

  • Orthanc + Dicomweb

    dicomweb.json 파일을 다음과 같은 형식으로 수정해서 실행한다.

    Gemini 도움을 받아서 “// 아래 Servers 블록을 추가하세요”만 추가해 주었다.

    {
        /**
         * The following options control the configuration of the Orthanc
         * plugin adding support of WADO and DICOMweb.
         **/
    
        "DicomWeb" : {
            "Enable" : true,         // Whether DICOMweb support is enabled
            "Root" : "/dicom-web/",  // Root URI of the DICOMweb API (for QIDO-RS, STOW-RS and WADO-RS)
            "EnableWado" : true,     // Whether WADO-URI (aka. WADO) support is enabled
            "WadoRoot" : "/wado",    // Root URI of the WADO-URI (aka. WADO) API
            "Host" : "localhost",    // Hard-codes the name of the host for subsequent WADO-RS requests
            "Ssl" : false,           // Whether HTTPS should be used for subsequent WADO-RS requests
    
            // 아래 Servers 블록을 추가하세요
            "Servers" : {
                    "MyLocalPACS" : {
                            "Url" : "http://localhost:8042/dicom-web/",
                            "Username" : "byun1114",
                            "Password" : "1"
                    }
            }
        }
    }
    
  • runlike

    컨테이너의 상세한 정보를 알기 위해서는 inspect 명령어를 이용하면 된다. 그런데 결과가 JSON으로 보이고, 다시 따라하기 매우 어렵다. 이를 해결해 주는 방법이다.

    docker run -v /var/run/docker.sock:/var/run/docker.sock \
        assaflavie/runlike YOUR-CONTAINER