From d9203f4d3727a2b8bcc3d2260cc7d946f6680e41 Mon Sep 17 00:00:00 2001 From: Kevin Burnett <18027+burnettk@users.noreply.github.com> Date: Thu, 16 Nov 2023 07:18:11 -0800 Subject: [PATCH] curl and procps in container for debugging (#680) * curl and procps in container for debugging * added some spacing between from lines in dockerfiles w/ burnettk --------- Co-authored-by: burnettk Co-authored-by: jasquat --- spiffworkflow-backend/Dockerfile | 12 +++++++++++- spiffworkflow-frontend/Dockerfile | 17 +++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/spiffworkflow-backend/Dockerfile b/spiffworkflow-backend/Dockerfile index f7a29b58..78a573b3 100644 --- a/spiffworkflow-backend/Dockerfile +++ b/spiffworkflow-backend/Dockerfile @@ -7,22 +7,29 @@ ENV PATH="$VIRTUAL_ENV/bin:$PATH" WORKDIR /app + +######################## - DEPLOYMENT + # base plus packages needed for deployment. Could just install these in final, but then we can't cache as much. # vim is just for debugging FROM base AS deployment # git-core because the app does "git commit", etc # curl because the docker health check uses it +# procps because it is useful for debugging # gunicorn3 for web server # default-mysql-client for convenience accessing mysql docker container # vim ftw RUN apt-get update \ && apt-get clean -y \ - && apt-get install -y -q git-core curl gunicorn3 default-mysql-client vim-tiny \ + && apt-get install -y -q git-core curl procps gunicorn3 default-mysql-client vim-tiny \ && rm -rf /var/lib/apt/lists/* RUN pip install poetry==1.6.1 + +######################## - SETUP + # Setup image for installing Python dependencies. FROM base AS setup @@ -46,6 +53,9 @@ RUN poetry install --without dev COPY . /app RUN poetry install --without dev + +######################## - FINAL + # Final image without setup dependencies. FROM deployment AS final diff --git a/spiffworkflow-frontend/Dockerfile b/spiffworkflow-frontend/Dockerfile index f1ecb266..56dcea0e 100644 --- a/spiffworkflow-frontend/Dockerfile +++ b/spiffworkflow-frontend/Dockerfile @@ -5,9 +5,23 @@ RUN mkdir /app WORKDIR /app +# curl for debugging +# procps for debugging +# vim ftw +RUN apt-get update \ + && apt-get clean -y \ + && apt-get install -y -q \ + curl \ + procps \ + vim-tiny \ + && rm -rf /var/lib/apt/lists/* + # this matches total memory on spiffworkflow-demo ENV NODE_OPTIONS=--max_old_space_size=2048 + +######################## - SETUP + # Setup image for installing JS dependencies. FROM base AS setup @@ -27,6 +41,9 @@ RUN npm ci --ignore-scripts RUN ./bin/build + +######################## - FINAL + # Final image without setup dependencies. FROM base AS final