diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 99f4b78f49d9b5967da6eaaf0904521a5d22377c..67bf20a697a5b88415e370516d8be36ee5411ddf 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,6 +1,6 @@
 cache:
   paths:
-  - .rebar3
+    - .rebar3
 
 before_script:
   - export GOROOT=${GO_HOME}
@@ -32,7 +32,6 @@ build:
     - master
     - production
   script:
-    - rebar3 update
     - rebar3 edoc
     - rebar3 as production do tar
     - relinfo.escript -vsn _build/production/rel/consul_proxy/releases/RELEASES > _build/VERSION
diff --git a/Makefile b/Makefile
index 5435eb9bfd3c11c60e8d3f2dfadce0da8e828338..2a9f749ba2b63b4b0a35c3231db54a6ea6977176 100644
--- a/Makefile
+++ b/Makefile
@@ -21,9 +21,9 @@ release:
 	@$(REBAR) release
 
 image:
-	@$(REBAR) release -d false
-	PLATFORM=x86 envsubst '$$PLATFORM' < apps/consul_proxy/priv/Dockerfile > _build/default/Dockerfile
-	docker build --no-cache=true -t ehedenst/consul_proxy:x86 -f _build/default/Dockerfile _build/default
+	@$(REBAR) do tar
+	REL_VSN=$(shell relinfo.escript -vsn _build/default/rel/consul_proxy/releases/RELEASES) envsubst '$$REL_VSN' < apps/consul_proxy/priv/Dockerfile > _build/default/Dockerfile
+	docker build -t hedenstroem/consul_proxy -f _build/default/Dockerfile _build/default
 
 edoc:
 	@$(REBAR) edoc
diff --git a/rebar.config b/rebar.config
index c67583ed812fab7002daaf570112102829337f47..db2b06599bf7d514c8e32f0d0d7991f2e3e010e9 100644
--- a/rebar.config
+++ b/rebar.config
@@ -18,7 +18,8 @@
 ]}.
 
 {relx, [
-    {release, {consul_proxy, "0.5.3"}, [consul_proxy]}, {sys_config, "./config/sys.config"},
+    {release, {consul_proxy, "0.5.3"}, [consul_proxy]},
+    {sys_config, "./config/sys.config"},
     {vm_args, "./config/vm.args"},
     {dev_mode, true},
     {include_erts, false},