Skip to content

Commit

Permalink
Docker COPY with checkout fetch-depth: 0 (#12066)
Browse files Browse the repository at this point in the history
Docker COPY with checkout fetch-depth: 0
  • Loading branch information
glenn-jocher committed Aug 31, 2023
1 parent 9974d51 commit 378ed74
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ jobs:
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
fetch-depth: 0 # copy full .git directory to access full git history in Docker images

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
Expand Down
3 changes: 1 addition & 2 deletions utils/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ RUN rm -rf /usr/src/app && mkdir -p /usr/src/app
WORKDIR /usr/src/app

# Copy contents
# COPY . /usr/src/app (issues as not a .git directory)
RUN git clone https://github.com/ultralytics/yolov5 /usr/src/app
COPY . /usr/src/app

# Install pip packages
COPY requirements.txt .
Expand Down
3 changes: 1 addition & 2 deletions utils/docker/Dockerfile-arm64
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app

# Copy contents
# COPY . /usr/src/app (issues as not a .git directory)
RUN git clone https://github.com/ultralytics/yolov5 /usr/src/app
COPY . /usr/src/app
ENV DEBIAN_FRONTEND teletype


Expand Down
3 changes: 1 addition & 2 deletions utils/docker/Dockerfile-cpu
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app

# Copy contents
# COPY . /usr/src/app (issues as not a .git directory)
RUN git clone https://github.com/ultralytics/yolov5 /usr/src/app
COPY . /usr/src/app


# Usage Examples -------------------------------------------------------------------------------------------------------
Expand Down

0 comments on commit 378ed74

Please sign in to comment.