From 36b06ad5bac2c4a4aee35d67ac6270a3bfe68eee Mon Sep 17 00:00:00 2001 From: Sarah Schulte Date: Fri, 3 Mar 2023 13:31:14 -0800 Subject: [PATCH] docker: use slim base images to reduce size --- Dockerfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 46e7e10..ee36e00 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # build stage -FROM node:16 as build-stage +FROM node:16-slim as build-stage WORKDIR /app COPY ./tau-dashboard/package*.json ./ RUN npm install @@ -7,11 +7,12 @@ COPY ./tau-dashboard /app RUN npm run build # prododuction stage -FROM python:3.8 as prod-stage +FROM python:3.8-slim as prod-stage ENV PYTHONUNBUFFERED=1 PYTHONHASHSEED=random \ PYTHONDONTWRITEBYTECODE=1 PIP_NO_CACHE_DIR=1 # install supervisord (supervisor-stdout is not py3 compatible in pypi) +RUN apt update && apt install -y git && rm -rf /var/lib/apt/lists/* RUN pip install supervisor git+https://github.com/coderanger/supervisor-stdout # Sets work directory to /code