avoiding git clone within the dockerfile
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 7s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 7s
This commit is contained in:
@@ -15,10 +15,9 @@ RUN apt-get update && \
|
||||
apt-get install -y git nano && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Clone the project
|
||||
RUN git clone -b testing https://gitea.tryton.geeraert.eu/pi-ux-ce/Django_kube.git
|
||||
|
||||
RUN cat Django_kube/requirements.txt
|
||||
# Copy only the requirements file first (Changes infrequently)
|
||||
COPY requirements.txt ./
|
||||
|
||||
RUN pip install --cache-dir=/opt/hostedtoolcache/pip --upgrade pip
|
||||
RUN pip list --cache-dir=/opt/hostedtoolcache/pip --outdated
|
||||
@@ -26,6 +25,9 @@ RUN pip install --cache-dir=/opt/hostedtoolcache/pip --upgrade wheel
|
||||
RUN pip install --cache-dir=/opt/hostedtoolcache/pip --upgrade setuptools
|
||||
RUN pip install --cache-dir=/opt/hostedtoolcache/pip -r Django_kube/requirements.txt
|
||||
|
||||
# Copy the rest of your application code (Changes frequently, invalidates subsequent cache)
|
||||
COPY . ./
|
||||
|
||||
COPY infra/testing/entrypoint.sh /code/entrypoint.sh
|
||||
RUN chmod +x /code/entrypoint.sh
|
||||
|
||||
|
||||
Reference in New Issue
Block a user