Support for docker
diff --git a/rabbitmq/cluster.sls b/rabbitmq/cluster.sls
index 50c6735..c3ed416 100644
--- a/rabbitmq/cluster.sls
+++ b/rabbitmq/cluster.sls
@@ -49,4 +49,4 @@
     - file: rabbitmq_dirs
     - service: rabbitmq_service
 
-{%- endif %}
\ No newline at end of file
+{%- endif %}
diff --git a/rabbitmq/files/entrypoint.sh b/rabbitmq/files/entrypoint.sh
new file mode 100644
index 0000000..b74b52e
--- /dev/null
+++ b/rabbitmq/files/entrypoint.sh
@@ -0,0 +1,11 @@
+{%- from "rabbitmq/map.jinja" import server with context -%}
+#!/bin/bash -e
+
+salt-call --local --retcode-passthrough state.highstate
+service {{ server.service }} stop || true
+
+/usr/lib/rabbitmq/bin/rabbitmq-server
+
+{#-
+vim: syntax=jinja
+-#}
diff --git a/rabbitmq/init.sls b/rabbitmq/init.sls
index a97115e..a04c73e 100644
--- a/rabbitmq/init.sls
+++ b/rabbitmq/init.sls
@@ -2,7 +2,7 @@
 {%- if pillar.rabbitmq is defined %}
 include:
 - rabbitmq.server
-{%- if pillar.rabbitmq.cluster is defined %}
+{%- if pillar.rabbitmq.cluster is defined and not grains.get('noservices', False) %}
 - rabbitmq.cluster
 {%- endif %}
 {%- endif %}
diff --git a/rabbitmq/server/init.sls b/rabbitmq/server/init.sls
index 5467a3d..20c5691 100644
--- a/rabbitmq/server/init.sls
+++ b/rabbitmq/server/init.sls
@@ -1,5 +1,7 @@
 include:
 - rabbitmq.server.service
+{%- if not grains.get('noservices', False) %}
 - rabbitmq.server.plugin
 - rabbitmq.server.vhost
-- rabbitmq.server.user
\ No newline at end of file
+- rabbitmq.server.user
+{%- endif %}
diff --git a/rabbitmq/server/service.sls b/rabbitmq/server/service.sls
index f9094f3..55f7f4f 100644
--- a/rabbitmq/server/service.sls
+++ b/rabbitmq/server/service.sls
@@ -42,7 +42,7 @@
 
 {%- endif %}
 
-{%- if server.secret_key is defined %}
+{%- if server.secret_key is defined and not grains.get('noservices', False) %}
 
 {%- if salt['cmd.run']('cat '+server.cookie_file) != server.secret_key %}
 
@@ -99,11 +99,24 @@
 
 {%- endif %}
 
+{%- if not grains.get('noservices', False) %}
 rabbitmq_service:
   service.running:
   - enable: true
   - name: {{ server.service }}
   - watch:
     - file: rabbitmq_config
+{%- endif %}
+
+{%- if grains.get('virtual_subtype', None) == "Docker" %}
+
+memcached_entrypoint:
+  file.managed:
+  - name: /entrypoint.sh
+  - template: jinja
+  - source: salt://rabbitmq/files/entrypoint.sh
+  - mode: 755
+
+{%- endif %}
 
 {%- endif %}