Porttainer - NAS용 Docker 컨테이너 관리자

3998 단어 nassynologydocker
이미지 예의 Pixabay .

Porttainer는 시스템에서 실행 중인 도커 컨테이너를 쉽게 관리할 수 있게 해주는 응용 프로그램입니다. 컨테이너를 실행하는 NAS 또는 동일한 작업을 수행하는 홈 서버에 추가할 수 있는 훌륭한 도구입니다. 실행 중이거나 관심이 있는 경우 Kubernetes 관리에도 사용할 수 있습니다. 내가 좋아하는 일부 기능은 다음과 같습니다.
  • UI에서 바로 SSH로 컨테이너에 연결
  • 로그 보기
  • 각 컨테이너에서 사용하는 리소스 보기

  • 전제 조건 📃

    • Download Docker from Package Center
      • In DSM head over to Package Center
      • Search for Docker
      • Install
    • Enable SSH for your NAS
      • If you don’t have SSH enabled follow this .

    폴더 구조 만들기 📂

    In DSM, open up the File Station:

    • Installing docker creates a docker folder at the root of your volume
    • Create a new folder in the docker folder for Portainer
      • I always create the folder based on the name of the image/container I’m setting up, in this case, portainer

    SSH로 NAS에 연결하고 이미지를 실행하세요 📦

    Using your preferred terminal SSH into your NAS, once logged in run the following:

    %USERNAME%@%NAS_NAME%:~$sudo su -
    

    You may be prompted to re-enter your password and you should do so. This command puts us in the root environment with the root user. Your terminal windows should now look like this:

    root@%NAS_NAME%:~#
    

    Copy and paste the following snippet in your terminal

    root@%NAS_NAME%:~# docker run -d -p 8000:8000 -p 9000:9000 --name=portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v /volume1/docker/portainer:/data portainer/portainer-ce@latest
    

    If you have any other containers already setup that may be using ports 8000 or 9000 make sure to change that before executing the Docker run command. Now we just have to set up the portainer instance in the web interface and we’ll be all set!

    포테이너 설정 🛳

    In your browser navigate to http://%SYNOLOGY_IP_ADDRESS%:9000 . Here we will be prompted to create a new user for Portainer.

    • Create your username
    • Create a new password
    • Confirm your password
    • Uncheck Allow collection...
    • Click Create User

    Once your user is created you will be brought to a screen to choose which container environment we want to manage with Portainer.

    • Select Docker (or if you are using this to manage Kubernetes then choose that one)
    • Click Connect
    Now you should be looking at the Portainer dashboard, congratulations you have successfully set up Portainer in your NAS/homeserver through Docker! Feel free to get out their image Docker Hub 또는 Community Edition에서 documentation 자세한 내용은! 건배! 🍻

    좋은 웹페이지 즐겨찾기