Skip to content

Commit

Permalink
Docker: Move the copy to a higher layer, for improved build performance.
Browse files Browse the repository at this point in the history
  • Loading branch information
realazthat committed Jul 9, 2024
1 parent bb7e1fd commit 0af25cf
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ WORKDIR /snipinator
# apt-get -y --no-install-recommends install git=1:2.39.2-1.1 &&
# apt-get -y upgrade &&

COPY . /snipinator
RUN apt-get -y update && apt-get -y --no-install-recommends install bash=5.2.15-2+b2 && \
RUN apt-get -y update && apt-get -y --no-install-recommends install bash=5.2.15-2+b7 && \
apt-get -y clean && \
apt-get -y autoremove && \
rm -rf /var/lib/apt/lists/* && \
Expand All @@ -18,12 +17,11 @@ RUN apt-get -y update && apt-get -y --no-install-recommends install bash=5.2.15-
chmod -R a+wrX /snipinator


COPY . /snipinator
USER user
WORKDIR /snipinator
ENV PATH=/home/user/.local/bin:$PATH
ENV PYTHONPATH=/home/user/.local/lib/python3.12/site-packages
ENV PATH=/home/user/.local/bin:$PATH
ENV PYTHONPATH=/home/user/.local/lib/python3.12/site-packages
RUN pip install --no-cache-dir --prefix=/home/user/.local .

# This is where the user will mount their data to.
Expand Down

0 comments on commit 0af25cf

Please sign in to comment.