grim/docker-noop
Clone
Summary
Browse
Changes
Graph
Initial revision
2015-11-06, Gary Kramlich
e3e429931ede
Parents
Children
936d2a782d97
Initial revision
2 files changed, 36 insertions(+), 0 deletions(-)
+4
-0
Dockerfile
+32
-0
README.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Dockerfile Fri Nov 06 10:45:38 2015 -0600
@@ -0,0 +1,4 @@
+FROM alpine:latest
+
+CMD ["true"]
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/README.md Fri Nov 06 10:45:38 2015 -0600
@@ -0,0 +1,32 @@
+This is a simple docker container that just runs /bin/true.
+
+I use it with docker-compose.override.yml to not waste a bunch of resources
+when using a shared service.
+
+For example, say I have the following docker-compose.yml file:
+
+ redis:
+ image: redis:2.8
+
+ app:
+ build: .
+ links:
+ - redis:redis
+
+When I'm running this locally I typically have a separate redis running that's
+being used by multiple other apps. So I'll add a docker-compose.override.yml
+like the following
+
+ redis:
+ image: rwgrim/noop
+
+ app:
+ links: []
+ external_links:
+ - redis:redis
+
+What this does is remove all the existing links and then links to my already
+running redis container. However, there is no way to disable a service with
+docker-compose, so we override the redis in the docker-compose.yml to use the
+noop container which is tiny and exits immediately.
+