@extends('layouts.app') @section('title', 'Docker 主機設定') @section('content')

Docker 主機設定

管理可連線的 Docker 主機(本機 Unix Socket 或遠端 TCP)

回 Docker 管理
@if(session('success')) @endif @if(session('error')) @endif
{{-- 主機清單 --}}
已設定主機({{ $hosts->count() }})
@foreach($hosts as $h) @endforeach @if($hosts->isEmpty()) @endif
名稱 類型 連線位址 備註 狀態 操作
{{ $h->name }} @if($h->type === 'local') 本機 @else TCP @endif @if($h->type === 'tcp') {{ $h->tcp_host }}:{{ $h->tcp_port }} @else /var/run/docker.sock @endif {{ $h->note ?: '—' }} @if($h->is_active) 啟用 @else 停用 @endif
@csrf @method('DELETE')
尚無設定
{{-- 新增表單 --}}
新增 Docker 主機
@csrf

TCP 遠端連線說明

  • 遠端主機需啟用 Docker TCP Socket(預設 port 2375 無 TLS)
  • 建議在防火牆限制 2375 port 來源 IP
  • 生產環境建議使用 TLS(port 2376)
{{-- 編輯 Modal --}} @endsection @push('scripts') @endpush