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:
parent
fc503ec76b
commit
d9203f4d37
|
@ -7,22 +7,29 @@ ENV PATH="$VIRTUAL_ENV/bin:$PATH"
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
|
|
||||||
|
######################## - DEPLOYMENT
|
||||||
|
|
||||||
# base plus packages needed for deployment. Could just install these in final, but then we can't cache as much.
|
# 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
|
# vim is just for debugging
|
||||||
FROM base AS deployment
|
FROM base AS deployment
|
||||||
|
|
||||||
# git-core because the app does "git commit", etc
|
# git-core because the app does "git commit", etc
|
||||||
# curl because the docker health check uses it
|
# curl because the docker health check uses it
|
||||||
|
# procps because it is useful for debugging
|
||||||
# gunicorn3 for web server
|
# gunicorn3 for web server
|
||||||
# default-mysql-client for convenience accessing mysql docker container
|
# default-mysql-client for convenience accessing mysql docker container
|
||||||
# vim ftw
|
# vim ftw
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
&& apt-get clean -y \
|
&& 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/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
RUN pip install poetry==1.6.1
|
RUN pip install poetry==1.6.1
|
||||||
|
|
||||||
|
|
||||||
|
######################## - SETUP
|
||||||
|
|
||||||
# Setup image for installing Python dependencies.
|
# Setup image for installing Python dependencies.
|
||||||
FROM base AS setup
|
FROM base AS setup
|
||||||
|
|
||||||
|
@ -46,6 +53,9 @@ RUN poetry install --without dev
|
||||||
COPY . /app
|
COPY . /app
|
||||||
RUN poetry install --without dev
|
RUN poetry install --without dev
|
||||||
|
|
||||||
|
|
||||||
|
######################## - FINAL
|
||||||
|
|
||||||
# Final image without setup dependencies.
|
# Final image without setup dependencies.
|
||||||
FROM deployment AS final
|
FROM deployment AS final
|
||||||
|
|
||||||
|
|
|
@ -5,9 +5,23 @@ RUN mkdir /app
|
||||||
|
|
||||||
WORKDIR /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
|
# this matches total memory on spiffworkflow-demo
|
||||||
ENV NODE_OPTIONS=--max_old_space_size=2048
|
ENV NODE_OPTIONS=--max_old_space_size=2048
|
||||||
|
|
||||||
|
|
||||||
|
######################## - SETUP
|
||||||
|
|
||||||
# Setup image for installing JS dependencies.
|
# Setup image for installing JS dependencies.
|
||||||
FROM base AS setup
|
FROM base AS setup
|
||||||
|
|
||||||
|
@ -27,6 +41,9 @@ RUN npm ci --ignore-scripts
|
||||||
|
|
||||||
RUN ./bin/build
|
RUN ./bin/build
|
||||||
|
|
||||||
|
|
||||||
|
######################## - FINAL
|
||||||
|
|
||||||
# Final image without setup dependencies.
|
# Final image without setup dependencies.
|
||||||
FROM base AS final
|
FROM base AS final
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue