Skip to content

Commit

Permalink
chore: move docker folder to under /examples
Browse files Browse the repository at this point in the history
edit Dockerfile
delete DEBIAN_FRONTEND argument

edit install.sh
System environment $REQUIRENMENTS_FILE_PATH was added
When the user sets $REQUIRENMENTS_FILE_PATH, the container tries to install it as a pip requirements file
  • Loading branch information
nanaones committed Jul 29, 2020
1 parent b699850 commit 7bf1f8b
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 6 deletions.
7 changes: 2 additions & 5 deletions Docker/Dockerfile → examples/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
FROM python:3.8.4-slim
ENV PYTHONIOENCODING UTF-8
ARG DEBIAN_FRONTEND=noninteractive

COPY ./config /config

ENV CONFIG_FILE_PATH=/config/config.py
ENV WORK_DIR=/work
WORKDIR /work

COPY config /config
RUN chmod 777 /config/install.sh /config/start.sh /config/config.sh &&\
pip3 install -r /config/async-requirements.txt &&\
pip3 install -r /config/sync-requirements.txt &&\
/config/install.sh

WORKDIR /work
ENTRYPOINT /config/start.sh

File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,8 @@ if [ -n "$FRAMEWORK_VERSION" ] && [ -n "$FRAMEWORK" ]; then
pip3 install "$FRAMEWORK"=="$FRAMEWORK_VERSION"
elif [ -n "$FRAMEWORK" ]; then
pip3 install "$FRAMEWORK"
fi
fi

if [ -n "$REQUIRENMENTS_FILE_PATH" ]; then
pip3 install -r "$REQUIRENMENTS_FILE_PATH"
fi
File renamed without changes.
File renamed without changes.

0 comments on commit 7bf1f8b

Please sign in to comment.