项目作者: flowerinthenight

项目描述 :
2017-09-14 Tokyo MasterCloud presentation files.
高级语言: Go
项目地址: git://github.com/flowerinthenight/20170914-tokyo-mastercloud-presentation.git


demoapp

Run demoapp as native, out to stdout. This demoapp is written in Go so a build environment is needed.

  1. $ cd demoapp
  2. $ go build -v
  3. $ ./demoapp
  4. CTRL+C

Run demoapp in a container, view logs via docker logs.

  1. $ docker build -t demoapp .
  2. $ docker run -d --name demoapp demoapp:latest
  3. $ docker logs -f demoapp
  4. CTRL+C
  5. $ docker rm -f demoapp

Run demoapp in a container using syslog as logging driver.

  1. $ docker run -d --log-driver=syslog --log-opt tag=demoapp --name demoapp demoapp:latest
  2. $ tail -f /var/log/syslog | grep -i 'demoapp'

Run demoapp in a container using ETW as logging driver (Windows).

  • First, run mftrace to read real-time logs from ETW. Tool is already provided, along with the config file.
  1. # do this in a separate cmd/powershell window
  2. $ cd mftrace\x86\
  3. $ mftrace -c config.xml
  • Then run our demoapp in a container.
  1. $ docker build -t demoapp -f Dockerfile-win .
  2. $ docker run -d --log-driver=etwlogs --name demoapp demoapp:latest