-
Notifications
You must be signed in to change notification settings - Fork 145
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Arko Dasgupta <arko.dasgupta@docker.com>
- Loading branch information
Arko Dasgupta
committed
Jan 16, 2020
1 parent
3463279
commit 02196e0
Showing
2 changed files
with
28 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
ARG GO_IMAGE | ||
ARG DISTRO=centos | ||
ARG SUITE=8 | ||
ARG BUILD_IMAGE=${DISTRO}:${SUITE} | ||
|
||
FROM ${GO_IMAGE} AS golang | ||
|
||
FROM ${BUILD_IMAGE} | ||
ENV GOPROXY=direct | ||
ENV GO111MODULE=off | ||
ENV GOPATH=/go | ||
ENV PATH $PATH:/usr/local/go/bin:$GOPATH/bin | ||
ENV AUTO_GOPATH 1 | ||
ENV DOCKER_BUILDTAGS seccomp selinux | ||
ENV RUNC_BUILDTAGS seccomp selinux | ||
ARG DISTRO | ||
ARG SUITE | ||
ENV DISTRO=${DISTRO} | ||
ENV SUITE=${SUITE} | ||
RUN yum install -y rpm-build rpmlint | ||
COPY SPECS /root/rpmbuild/SPECS | ||
# Overwrite repo that was failing on aarch64 | ||
RUN sed -i 's/altarch/centos/g' /etc/yum.repos.d/CentOS-Sources.repo | ||
RUN yum-builddep -y /root/rpmbuild/SPECS/*.spec | ||
COPY --from=golang /usr/local/go /usr/local/go | ||
WORKDIR /root/rpmbuild | ||
ENTRYPOINT ["/bin/rpmbuild"] |