Error when run build-img.sh
fajaryanw opened this issue · comments
fajaryanw commented
I run build-img.sh
on folder hack
but getting error:
+++ [1008 04:24:10] Generating image...
Sending build context to Docker daemon 9.728kB
Step 1/21 : FROM centos:7 as build
---> eeb6ee3f44bd
Step 2/21 : ARG version
---> Using cache
---> 531c2de10efc
Step 3/21 : ARG commit
---> Using cache
---> 6fc182aa9c69
Step 4/21 : RUN yum install -y rpm-build make
---> Using cache
---> 31807ee37af1
Step 5/21 : ENV GOLANG_VERSION 1.13.4
---> Using cache
---> 40954c916844
Step 6/21 : RUN curl -sSL https://dl.google.com/go/go${GOLANG_VERSION}.linux-amd64.tar.gz | tar -C /usr/local -xz
---> Using cache
---> 0449fd06b22d
Step 7/21 : ENV GOPATH /go
---> Using cache
---> 9f0244b0b788
Step 8/21 : ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH
---> Using cache
---> 4c390d59d877
Step 9/21 : RUN mkdir -p /root/rpmbuild/{SPECS,SOURCES}
---> Using cache
---> 8ceb116f7df8
Step 10/21 : COPY gpu-admission.spec /root/rpmbuild/SPECS
---> Using cache
---> f9c2b9e3038d
Step 11/21 : COPY gpu-admission-source.tar.gz /root/rpmbuild/SOURCES
---> 27e7f6056f67
Step 12/21 : RUN echo '%_topdir /root/rpmbuild' > /root/.rpmmacros && echo '%__os_install_post %{nil}' >> /root/.rpmmacros && echo '%debug_package %{nil}' >> /root/.rpmmacros
---> Running in 9a7e7e8c1fe8
Removing intermediate container 9a7e7e8c1fe8
---> 05e83bb47665
Step 13/21 : WORKDIR /root/rpmbuild/SPECS
---> Running in c5dd17e7b575
Removing intermediate container c5dd17e7b575
---> 13b2d9326e03
Step 14/21 : RUN rpmbuild -ba --quiet --define 'version '${version}'' --define 'commit '${commit}'' gpu-admission.spec
---> Running in dc272d3f908d
/usr/bin/tar: Removing leading `/' from member names
make: *** No rule to make target `all'. Stop.
error: Bad exit status from /var/tmp/rpm-tmp.ExwRfK (%build)
Bad exit status from /var/tmp/rpm-tmp.ExwRfK (%build)
The command '/bin/sh -c rpmbuild -ba --quiet --define 'version '${version}'' --define 'commit '${commit}'' gpu-admission.spec' returned a non-zero code: 1
How to solve it ?
Thank You