title: Docker Container Exits Immediately Upon Start
body: <p>I am trying to run the new Elasticsearch 6.0 docker container on an Amazon Linux AMI (the standard one). I previously had 5.6 running with no issues on a different instance, but my container is immediately crashing when I start it up.</p>
  
  <p>Here's the command I'm using: <code>docker run -it -p 9200:9200 -p 9300:9300 -d docker.elastic.co/elasticsearch/elasticsearch:6.0.0</code></p>
  
  <p>I referenced this post on Docker crashing, but still seemed to run into the same issues: <a href="https://stackoverflow.com/questions/28212380/why-docker-container-exits-immediately">Why docker container exits immediately</a></p>
  
  <p>I ran docker logs  and get the following response:</p>
  
  <pre><code>[2017-11-28T19:00:30,946][INFO ][o.e.n.Node               ] [] initializing ...
  [2017-11-28T19:00:31,013][INFO ][o.e.e.NodeEnvironment    ] [eEXrI6m] using [1] data paths, mounts [[/ (overlay)]], net usable_space [4.5gb], net total_space [7.7gb], types [overlay]
  [2017-11-28T19:00:31,014][INFO ][o.e.e.NodeEnvironment    ] [eEXrI6m] heap size [989.8mb], compressed ordinary object pointers [true]
  [2017-11-28T19:00:31,015][INFO ][o.e.n.Node               ] node name [eEXrI6m] derived from node ID [eEXrI6mGTci22tpTNMMh8w]; set [node.name] to override
  [2017-11-28T19:00:31,015][INFO ][o.e.n.Node               ] version[6.0.0], pid[1], build[8f0685b/2017-11-10T18:41:22.859Z], OS[Linux/4.9.62-21.56.amzn1.x86_64/amd64], JVM[Oracle Corporation/OpenJDK 64-Bit Server VM/1.8.0_151/25.151-b12]
  [2017-11-28T19:00:31,015][INFO ][o.e.n.Node               ] JVM arguments [-Xms1g, -Xmx1g, -XX:+UseConcMarkSweepGC, -XX:CMSInitiatingOccupancyFraction=75, -XX:+UseCMSInitiatingOccupancyOnly, -XX:+AlwaysPreTouch, -Xss1m, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djna.nosys=true, -XX:-OmitStackTraceInFastThrow, -Dio.netty.noUnsafe=true, -Dio.netty.noKeySetOptimization=true, -Dio.netty.recycler.maxCapacityPerThread=0, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -XX:+HeapDumpOnOutOfMemoryError, -Des.cgroups.hierarchy.override=/, -Des.path.home=/usr/share/elasticsearch, -Des.path.conf=/usr/share/elasticsearch/config]
  [2017-11-28T19:00:32,283][INFO ][o.e.p.PluginsService     ] [eEXrI6m] loaded module [aggs-matrix-stats]
  [2017-11-28T19:00:32,283][INFO ][o.e.p.PluginsService     ] [eEXrI6m] loaded module [analysis-common]
  [2017-11-28T19:00:32,283][INFO ][o.e.p.PluginsService     ] [eEXrI6m] loaded module [ingest-common]
  [2017-11-28T19:00:32,283][INFO ][o.e.p.PluginsService     ] [eEXrI6m] loaded module [lang-expression]
  [2017-11-28T19:00:32,283][INFO ][o.e.p.PluginsService     ] [eEXrI6m] loaded module [lang-mustache]
  [2017-11-28T19:00:32,283][INFO ][o.e.p.PluginsService     ] [eEXrI6m] loaded module [lang-painless]
  [2017-11-28T19:00:32,283][INFO ][o.e.p.PluginsService     ] [eEXrI6m] loaded module [parent-join]
  [2017-11-28T19:00:32,283][INFO ][o.e.p.PluginsService     ] [eEXrI6m] loaded module [percolator]
  [2017-11-28T19:00:32,283][INFO ][o.e.p.PluginsService     ] [eEXrI6m] loaded module [reindex]
  [2017-11-28T19:00:32,283][INFO ][o.e.p.PluginsService     ] [eEXrI6m] loaded module [repository-url]
  [2017-11-28T19:00:32,283][INFO ][o.e.p.PluginsService     ] [eEXrI6m] loaded module [transport-netty4]
  [2017-11-28T19:00:32,284][INFO ][o.e.p.PluginsService     ] [eEXrI6m] loaded module [tribe]
  [2017-11-28T19:00:32,284][INFO ][o.e.p.PluginsService     ] [eEXrI6m] loaded plugin [ingest-geoip]
  [2017-11-28T19:00:32,284][INFO ][o.e.p.PluginsService     ] [eEXrI6m] loaded plugin [ingest-user-agent]
  [2017-11-28T19:00:32,284][INFO ][o.e.p.PluginsService     ] [eEXrI6m] loaded plugin [x-pack]
  [2017-11-28T19:00:34,795][INFO ][o.e.x.m.j.p.l.CppLogMessageHandler] [controller/120] [Main.cc@128] controller (64 bit): Version 6.0.0 (Build 8e6ab35cf803a2) Copyright (c) 2017 Elasticsearch BV
  [2017-11-28T19:00:34,834][INFO ][o.e.d.DiscoveryModule    ] [eEXrI6m] using discovery type [zen]
  [2017-11-28T19:00:35,513][INFO ][o.e.n.Node               ] initialized
  [2017-11-28T19:00:35,513][INFO ][o.e.n.Node               ] [eEXrI6m] starting ...
  [2017-11-28T19:00:35,648][INFO ][o.e.t.TransportService   ] [eEXrI6m] publish_address {xxx.xx.x.x:9300}, bound_addresses {0.0.0.0:9300}
  [2017-11-28T19:00:35,664][INFO ][o.e.b.BootstrapChecks    ] [eEXrI6m] bound or publishing to a non-loopback or non-link-local address, enforcing bootstrap checks
  
  ERROR: [2] bootstrap checks failed
  [1]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536]
  [2]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
  [2017-11-28T19:00:35,675][INFO ][o.e.n.Node               ] [eEXrI6m] stopping ...
  [2017-11-28T19:00:35,734][INFO ][o.e.n.Node               ] [eEXrI6m] stopped
  [2017-11-28T19:00:35,734][INFO ][o.e.n.Node               ] [eEXrI6m] closing ...
  [2017-11-28T19:00:35,745][INFO ][o.e.n.Node               ] [eEXrI6m] closed
  </code></pre>