From 4bb5aacc9c9a159ccc1d00d19552215330b862cb Mon Sep 17 00:00:00 2001
From: George Sedov <george.sedov@desy.de>
Date: Tue, 22 Feb 2022 18:11:18 +0100
Subject: [PATCH] change docker into two stages

---
 deploy/asapo_services/Dockerfile | 33 +-------------------------------
 1 file changed, 1 insertion(+), 32 deletions(-)

diff --git a/deploy/asapo_services/Dockerfile b/deploy/asapo_services/Dockerfile
index b58a5013c..6f6e8ae7b 100644
--- a/deploy/asapo_services/Dockerfile
+++ b/deploy/asapo_services/Dockerfile
@@ -1,37 +1,6 @@
-FROM debian:bullseye
-
-RUN set -eux; \
-	apt-get update; \
-	apt-get install -y --no-install-recommends \
-		ca-certificates \
-		curl \
-		gnupg \
-	;
-
-RUN curl -fsSL https://apt.releases.hashicorp.com/gpg  | gpg --dearmor > /usr/share/keyrings/nomad-hashicorp-archive-keyring.gpg
-RUN echo "deb [arch=amd64 signed-by=/usr/share/keyrings/nomad-hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com bullseye main" >> /etc/apt/sources.list
-
-RUN set -eux; \
-	apt-get update; \
-	apt-get install -y --no-install-recommends \
-		supervisor \
-		gnupg-agent \
-		dnsutils \
-		nomad \
-		consul \
-		terraform \
-		iproute2 \
-	; \
-	rm -rf /var/lib/apt/lists/*
+FROM gitlab.desy.de:5555/asapo/asapo/asapo-nomad-consul:latest
 
 COPY scripts/ /var/asapo/
-COPY jobs-* /usr/bin/
-COPY asapo-wait-service  /usr/bin/
-COPY supervisord.conf /etc/
-COPY *.py  /etc/asapo/
-COPY *.hcl.tpl  /etc/asapo/
-
-RUN mkdir -p /var/log/supervisord/ /etc/consul.d /etc/nomad.d /var/nomad /var/consul
 
 RUN cd /var/asapo && terraform init
 
-- 
GitLab