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 <burnettk@users.noreply.github.com>
Co-authored-by: jasquat <jasquat@users.noreply.github.com>
This commit is contained in:
Kevin Burnett 2023-11-16 07:18:11 -08:00 committed by GitHub
parent fc503ec76b
commit d9203f4d37
2 changed files with 28 additions and 1 deletions

View File

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

View File

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