Skip to content

Commit

Permalink
Skip git safe.directory check in Dockerfiles
Browse files Browse the repository at this point in the history
  • Loading branch information
zrhoffman committed Jun 7, 2023
1 parent 0567a23 commit 808fd57
Show file tree
Hide file tree
Showing 14 changed files with 42 additions and 14 deletions.
4 changes: 3 additions & 1 deletion cache-config/testing/docker/ort_test/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ EXPOSE 80 443

RUN yum install -y epel-release && \
yum install -y initscripts git jq gcc lua nmap-ncat && \
yum clean all
yum clean all && \
# Add skip git's safe.directory check
git config --global --add safe.directory '*'

# Note that if more than one t3c RPM matches this wildcard, this Dockerfile will
# break because this will create a directory instead of an RPM file, which it
Expand Down
4 changes: 3 additions & 1 deletion infrastructure/docker/build/Dockerfile-cache-config
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ RUN rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-* && \
rsync \
gzip \
epel-release && \
yum -y clean all
yum -y clean all && \
# Add skip git's safe.directory check
git config --global --add safe.directory '*'

# CentOS 7 has pandoc in epel (which we installed above), 8 has it in [pP]ower[tT]ools
RUN if [[ ${RHEL_VERSION%%.*} -ge 8 ]]; then \
Expand Down
4 changes: 3 additions & 1 deletion infrastructure/docker/build/Dockerfile-docs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ RUN rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-* && \
rpm-build \
rsync \
epel-release && \
yum -y clean all
yum -y clean all \
# Add skip git's safe.directory check
git config --global --add safe.directory '*'

### docs specific requirements
FROM common-dependencies AS docs
Expand Down
4 changes: 3 additions & 1 deletion infrastructure/docker/build/Dockerfile-fakeOrigin
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ RUN rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-* && \
rpm-build \
rsync \
epel-release && \
yum -y clean all
yum -y clean all && \
# Add skip git's safe.directory check
git config --global --add safe.directory '*'

### fakeOrigin specific requirements
FROM common-dependencies AS fakeOrigin
Expand Down
4 changes: 3 additions & 1 deletion infrastructure/docker/build/Dockerfile-grove
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ RUN rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-* && \
rpm-build \
rsync \
epel-release && \
yum -y clean all
yum -y clean all && \
# Add skip git's safe.directory check
git config --global --add safe.directory '*'

### grove specific requirements
FROM common-dependencies AS grove
Expand Down
4 changes: 3 additions & 1 deletion infrastructure/docker/build/Dockerfile-grovetccfg
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ RUN rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-* && \
rpm-build \
rsync \
epel-release && \
yum -y clean all
yum -y clean all && \
# Add skip git's safe.directory check
git config --global --add safe.directory '*'

### grovetccfg specific requirements
FROM common-dependencies AS grovetccfg
Expand Down
4 changes: 3 additions & 1 deletion infrastructure/docker/build/Dockerfile-source
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ RUN rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-* && \
rpm-build \
rsync \
epel-release && \
yum -y clean all
yum -y clean all && \
# Add skip git's safe.directory check
git config --global --add safe.directory '*'

### source specific requirements
FROM common-dependencies AS source
Expand Down
4 changes: 3 additions & 1 deletion infrastructure/docker/build/Dockerfile-tc-health-client
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ RUN rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-* && \
rsync \
gzip \
epel-release && \
yum -y clean all
yum -y clean all && \
# Add skip git's safe.directory check
git config --global --add safe.directory '*'

# CentOS 7 has pandoc in epel (which we installed above), 8 has it in [pP]ower[tT]ools
RUN if [[ ${RHEL_VERSION%%.*} -ge 8 ]]; then \
Expand Down
4 changes: 3 additions & 1 deletion infrastructure/docker/build/Dockerfile-traffic_monitor
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ RUN rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-* && \
rpm-build \
rsync \
epel-release && \
yum -y clean all
yum -y clean all && \
# Add skip git's safe.directory check
git config --global --add safe.directory '*'

### traffic_monitor specific requirements
FROM common-dependencies AS traffic-monitor
Expand Down
4 changes: 3 additions & 1 deletion infrastructure/docker/build/Dockerfile-traffic_ops
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ RUN rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-* && \
rpm-build \
rsync \
epel-release && \
yum -y clean all
yum -y clean all && \
# Add skip git's safe.directory check
git config --global --add safe.directory '*'

### traffic_ops specific requirements
FROM common-dependencies AS traffic-ops
Expand Down
4 changes: 3 additions & 1 deletion infrastructure/docker/build/Dockerfile-traffic_portal
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ RUN rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-* && \
rpm-build \
rsync \
epel-release && \
yum -y clean all
yum -y clean all && \
# Add skip git's safe.directory check
git config --global --add safe.directory '*'

RUN curl -sL https://rpm.nodesource.com/setup_16.x | bash - && \
yum -y install nodejs
Expand Down
4 changes: 3 additions & 1 deletion infrastructure/docker/build/Dockerfile-traffic_router
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ RUN rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-* && \
rpm-build \
rsync \
epel-release && \
yum -y clean all
yum -y clean all && \
# Add skip git's safe.directory check
git config --global --add safe.directory '*'

### traffic_router specific requirements
FROM common-dependencies AS traffic-router
Expand Down
4 changes: 3 additions & 1 deletion infrastructure/docker/build/Dockerfile-traffic_stats
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ RUN rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-* && \
rpm-build \
rsync \
epel-release && \
yum -y clean all
yum -y clean all && \
# Add skip git's safe.directory check
git config --global --add safe.directory '*'

### traffic_stats specific requirements
FROM common-dependencies AS traffic-stats
Expand Down
4 changes: 3 additions & 1 deletion infrastructure/docker/build/Dockerfile-tsb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@
ARG BASE_IMAGE=rockylinux \
RHEL_VERSION=8
FROM ${BASE_IMAGE}:${RHEL_VERSION} as tsb-build
RUN yum clean all && yum -y install git
RUN yum clean all && yum -y install git && \
# Add skip git's safe.directory check
git config --global --add safe.directory '*'
COPY GO_VERSION /
RUN curl -L https://dl.google.com/go/go$(cat /GO_VERSION).linux-amd64.tar.gz | tar -C /usr/local -xz && ln -s /usr/local/go/bin/go /usr/bin/go
# Fetch tested version of tsb:
Expand Down

0 comments on commit 808fd57

Please sign in to comment.