Skip to content

Latest commit

 

History

History
51 lines (43 loc) · 2.21 KB

COS-mu-20160525.md

File metadata and controls

51 lines (43 loc) · 2.21 KB

COS Docker Meetup 2016-05-25

GUI Containers & Native docker

Native docker

Overview

  • OSX - YMMV
  • Tool bar interface
  • xhyve
    • Lightweight virtualization (replaces virtualbox)
    • OSX port of FreeBSD's bhyve
    • Requires OSX 10.10 (Yosemite)

Troubleshooting

  • logging
    • syslog -k Sender Docker Basically grep'ing Docker from the logs
    • Logging tool Console app in /Applications/Utilities
      • Open system.log and search for Docker
  • Running both on the same system
    • remove the DOCKER environment variables - eval $(docker env -u)

GUI Containers

Concept - running tools on a machine without having to install them locally. Also, having multiple accounts open to the same site (twitter) at the same time.

Additional tools required (OS/X)

  • XQuartz - XServer for OS/X
  • socat - socket interface between Docker and XQuartz

Containers

  • Firefox Kiosk mode docker run -e DISPLAY=192.168.99.1:0 --name ff-flowdock palemtnrider/dff:0.1.0
  • Chrome docker run --name presentation --privileged -e DISPLAY=192.168.99.1:0 palemtnrider/dc:0.1.0
  • Electron Flowdock docker run --name electron-fd --security-opt seccomp:unconfined -e DISPLAY=192.168.99.1:0 palemtnrider/electron-fd:0.1.0

Issues

  • Cut & Paste - probably tied more to Xquartz and not Docker
  • Network performance can be spotty
  • Regarding electron - not all sites behave (Flowdock SSO)
  • errors in the console
  • fairly large images (required to run browser)

Best practices

  • Don't use loopback storage in production - performance Issues
  • In Dockerfiles - use && instead of ; in RUN commands
    • this can cause failures to be skipped
  • Single process per container
    • we were using superviosrd - masked failures (supervisord was still running :) )
  • Start using alpine as your base os as the official Docker images are moving this way
  • Be aware of your storage drivers
    • turns out RPM install of apache in a CentOS container on an ubuntu 14.04 docker host doesn't work due to aufs fallback is device mapper or newer version of aufs
  • ordering in Dockerfile is important to reduce build time