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
This commit is contained in:
dumbmoron 2024-05-13 18:55:42 +00:00
parent 9419266cd7
commit 3fe6004600
No known key found for this signature in database

View file

@ -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