https://docs.docker.com/installation
- install visualbox
- brew install docker boot2docker
# Add this to your nginx.conf under http { } | |
server { | |
listen 843; | |
server_name localhost; | |
location / { | |
rewrite ^(.*)$ /crossdomain.xml; | |
} |
/*jslint regexp: true, maxerr: 50, indent: 2 */ | |
(function (global) { | |
"use strict"; | |
function URLUtils(url, baseURL) { | |
var m = String(url).replace(/^\s+|\s+$/g, "").match(/^([^:\/?#]+:)?(?:\/\/(?:([^:@\/?#]*)(?::([^:@\/?#]*))?@)?(([^:\/?#]*)(?::(\d*))?))?([^?#]*)(\?[^#]*)?(#[\s\S]*)?/); | |
if (!m) { | |
throw new RangeError(); | |
} |
/etc/security/limits.conf: | |
* - nofile 65535 | |
* - memlock unlimited | |
/etc/elasticsearch/elasticsearch.yml: | |
index.number_of_shards: 5 | |
index.number_of_replicas: 0 | |
bootstrap.mlockall: true | |
vi ~/.bashrc |
{ | |
"autocomplete_closures": true, | |
"autocomplete_builtins": true, | |
"autocomplete_suggest_imports": true, | |
"use_named_imports": true, | |
"fmt_cmd": ["goimports"], | |
"env":{ | |
"GOROOT": "/Users/shao/Developer/go", | |
"GOPATH": "/Users/shao/Developer/workspace" | |
} |
##################### ElasticSearch Configuration Example ##################### | |
# This file contains an overview of various configuration settings, | |
# targeted at operations staff. Application developers should | |
# consult the guide at <http://elasticsearch.org/guide>. | |
# | |
# The installation procedure is covered at | |
# <http://elasticsearch.org/guide/en/elasticsearch/reference/current/setup.html>. | |
# | |
# ElasticSearch comes with reasonable defaults for most settings, |
https://docs.docker.com/installation
$ModLoad omrelp | |
$RepeatedMsgReduction off | |
$template ls_json,"{\"@version\":1,\"es_environment\":\"dmz\",\"@timestamp\":\"%timestamp:1:19:date-rfc3339%.%timestamp:1:3:date-subseconds%+00:00\",%HOSTNAME:::jsonf:source_host%,\"message\":\"%timestamp% %app-name%:%msg:::json%\",%syslogfacility-text:::jsonf:facility%,%syslogseverity-text:::jsonf:severity%,%app-name:::jsonf:program%,%procid:::jsonf:processid%}" | |
*.* :omrelp:X.X.X.X:21514;ls_json |
filter { | |
if [type] == "apache_access" { | |
grok { | |
match => { "message" => "%{COMMONAPACHELOG}" } | |
} | |
date { | |
match => [ "timestamp" , "dd/MMM/yyyy:HH:mm:ss Z" ] | |
} | |
} |
国内从 Docker Hub 拉取镜像有时会遇到困难,此时可以配置镜像加速器。Docker 官方和国内很多云服务商都提供了国内加速器服务。
Dockerized 实践 https://github.com/y0ngb1n/dockerized
Ubuntu 16.04+、Debian 8+、CentOS 7+