Skip to content

Commit

Permalink
Ensure that function reqs are installed
Browse files Browse the repository at this point in the history
**What**
- Update the dockerfiles to ensure that the function specific
requirements are installed as well as the template reqs.  This ensures
that users can customize their installs

Signed-off-by: Lucas Roesler <[email protected]>
  • Loading branch information
LucasRoesler committed Jun 10, 2019
1 parent 13d0251 commit 72335a4
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 4 deletions.
10 changes: 8 additions & 2 deletions template/pydatatscience-web/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ RUN apt-get update \
&& chmod +x /usr/bin/fwatchdog

# Add non root user
WORKDIR /root/
WORKDIR /home/app/
USER app

RUN bash /tmp/miniconda.sh -bfp $HOME/conda \
Expand All @@ -38,14 +38,20 @@ COPY index.py .

RUN mkdir -p function
RUN touch ./function/__init__.py

WORKDIR /home/app/function/
COPY function/requirements.txt .
RUN conda install --file requirements.txt -c ${CHANNEL}

WORKDIR /home/app/
COPY function/ ./function

# Set environment variables
ENV fprocess="python index.py"
ENV cgi_headers="true"
ENV mode="http"
ENV upstream_url="http://127.0.0.1:5000"
ENV function_root="/root/function"
ENV function_root="/home/app/function"

HEALTHCHECK --interval=5s CMD [ -e /tmp/.lock ] || exit 1

Expand Down
Empty file.
10 changes: 8 additions & 2 deletions template/pydatatscience/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ RUN apt-get update \
&& chmod +x /usr/bin/fwatchdog

# Add non root user
WORKDIR /root/
WORKDIR /home/app/
USER app

RUN bash /tmp/miniconda.sh -bfp $HOME/conda \
Expand All @@ -38,14 +38,20 @@ COPY index.py .

RUN mkdir -p function
RUN touch ./function/__init__.py

WORKDIR /home/app/function/
COPY function/requirements.txt .
RUN conda install --file requirements.txt -c ${CHANNEL}

WORKDIR /home/app/
COPY function/ ./function

# Set environment variables
ENV fprocess="python index.py"
ENV cgi_headers="true"
ENV mode="http"
ENV upstream_url="http://127.0.0.1:5000"
ENV function_root="/root/function"
ENV function_root="/home/app/function"

HEALTHCHECK --interval=5s CMD [ -e /tmp/.lock ] || exit 1

Expand Down
Empty file.

0 comments on commit 72335a4

Please sign in to comment.