From cfc8a9e18e3cf4c4b9b53a2c6e978c8624a83628 Mon Sep 17 00:00:00 2001
From: Michael McVady <femtonaut@gmail.com>
Date: Tue, 24 May 2022 01:34:41 -0500
Subject: WIP: Dockerfile for standalone binary

---
 Dockerfile | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

(limited to 'Dockerfile')

diff --git a/Dockerfile b/Dockerfile
index cc0c52d..71ce635 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -2,7 +2,7 @@ FROM debian:bullseye-slim
 
 LABEL maintainer="Michael McVady <femtonaut@gmail.com>"
 
-COPY . /clog
+COPY . /tmp/clog
 
 ARG KORE_VERSION=4.2.2
 
@@ -18,20 +18,25 @@ RUN set -e \
 		pkg-config \
 		libssl-dev \
 		libpq-dev \
+	&& cd /tmp \
 	&& curl https://kore.io/releases/kore-${KORE_VERSION}.tar.gz --output kore-${KORE_VERSION}.tar.gz \
 	&& tar zfvx kore-${KORE_VERSION}.tar.gz \
 	&& cd kore-${KORE_VERSION} \
 	&& make clean \
 	&& make PGSQL=1 TLS_BACKEND=none \
 	&& make install \
-	&& cd .. \
-	&& rm -rf kore-${KORE_VERSION} \
-	&& cd /clog \
+	&& cd ..
+
+RUN set -e \
+	&& rm -rf /tmp/kore-${KORE_VERSION} \
+	&& cd /tmp/clog \
 	&& cp -r assets /var/chroot/kore/. \
-	&& kodev build
+	&& kodev build \
+	&& mkidr /clog \
+	&& cp clog /clog/. 
 
 EXPOSE 8888
 STOPSIGNAL SIGQUIT
 
 WORKDIR /clog
-ENTRYPOINT [ "kore", "-c", "conf/clog.conf", "-f"]
+ENTRYPOINT [ "clog", "-f"]
-- 
cgit v1.2.3