From 3fe60046008364d6425a95a2db02cf6cdad5a54b Mon Sep 17 00:00:00 2001
From: dumbmoron <log@riseup.net>
Date: Mon, 13 May 2024 18:55:42 +0000
Subject: [PATCH] dockerfile: fix freebind building, set up everything in one
 step

this also shrinks the image by around 40MB, since the apt/lists layer no longer sticks around
---
 Dockerfile | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/Dockerfile b/Dockerfile
index 4eee25b9..c98785d9 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,14 +1,13 @@
 FROM node:18-bullseye-slim
 WORKDIR /app
 
-RUN apt-get update
-RUN apt-get install -y git
-RUN rm -rf /var/lib/apt/lists/*
-
 COPY package*.json ./
-RUN npm install
 
-RUN git clone -n https://github.com/imputnet/cobalt.git --depth 1 && mv cobalt/.git ./ && rm -rf cobalt
+RUN apt-get update && \
+    apt-get install -y git python3 build-essential && \
+    npm install && \
+    apt purge --autoremove -y python3 build-essential && \
+    rm -rf ~/.cache/ /var/lib/apt/lists/*
 
 COPY . .
 EXPOSE 9000