User Tools

Site Tools


esxi:docker_host

Docker Host

Install Docker on Photon OS on ESXi

  • Download the Photon OS OVA with virtual hardware v13 from https://github.com/vmware/photon/wiki/Downloading-Photon-OS
  • In ESXi:
    • Create/Register VM
    • Deploy a virtual machine from an OVF or OVA file
    • Name the VM
    • Upload the Photon OS OVA file
    • Specify the desired Target Datastore
    • Accept the License Agreement
    • Select Deployment Options
    • Confirm settings
    • Actions > Edit Settings
    • Select appropriate VM settings depending on desired applications
    • Use NVMe Controller for the hard disk if using NVMe storage
    • Set desired autostart setting
    • Run VM
    • Login with root details from the VM note
    • Set new password
    • Set new hostname hostnamectl set-hostname <hostname>
    • Update packages tdnf upgrade
    • Enable Docker to run at startup systemctl enable docker
    • Shutdown, Save initial snapshot, and start the VM again
    • Install Portainer:
      • docker volume create portainer_data
      • docker run -d -p 8000:8000 -p 9000:9000 -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer
  • Open portainer at http://VM-url:9000
    • Create account
    • Navigate to the only running container
      • Rename it to Portainer
      • Set Restart policies to Always
  • Install Unifi Controller
    • Add new container
    • Name > Unifi Controller
    • Image > jacobalberty/unifi:stable
    • Add network ports:
      • 8080/tcp - Device command/control
      • 8443/tcp - Web interface + API
      • 8843/tcp - HTTPS portal
      • 8880/tcp - HTTP portal
      • 3478/udp - STUN service
      • 6789/tcp - Speed Test (unifi5 only)
      • 10001/udp - UBNT Discovery
    • Add Volume mapping:
      • container > /unifi
      • bind
      • host > /root/unifi
    • Add Environment variables:
      • JVM_MAX_THREAD_STACK_SIZE > 1280k
      • TZ > <Timezone of server>
    • Restart policy > Unless stopped
    • Deploy the container
    • Access the controller at https://VM-url:8443
  • Shutdown, Save initial snapshot, and start the VM again
  • Edit VM note to indicate details/running applications
  • FIXME: Add network mounts
esxi/docker_host.txt · Last modified: 2019/09/17 13:50 by derek