diff options
author | 2020-03-01 06:44:16 -0800 | |
---|---|---|
committer | 2020-03-01 06:46:30 -0800 | |
commit | e602889dedb9bd5db42a55274c11a74f42b9b700 (patch) | |
tree | ce0dd999a3da66171c34e4ef2ff41df3b93abede | |
parent | Make logs coloured! (diff) |
Optimize Dockerfile
-rw-r--r-- | Dockerfile | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Dockerfile b/Dockerfile index 271c25050..2fba8cf68 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,12 +9,15 @@ ENV PIP_NO_CACHE_DIR=false \ # Install pipenv RUN pip install -U pipenv -# Copy project files into working directory +# Create the working directory WORKDIR /bot -COPY . . # Install project dependencies +COPY Pipfile* ./ RUN pipenv install --system --deploy +# Copy the source code in last to optimize rebuilding the image +COPY . . + ENTRYPOINT ["python3"] CMD ["-m", "bot"] |