Skip to content

Commit

Permalink
Remove arch specific dockerfiles
Browse files Browse the repository at this point in the history
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
  • Loading branch information
seemethere committed Aug 16, 2018
1 parent fbc1757 commit 0fd20b9
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 58 deletions.
14 changes: 8 additions & 6 deletions rpm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ GO_VERSION:=1.10.3
GO_IMAGE=$(GO_BASE_IMAGE):$(GO_VERSION)
GEN_RPM_VER=$(shell ./gen-rpm-ver $(CLI_DIR) $(VERSION))
CHOWN=docker run --rm -i -v $(CURDIR):/v -w /v alpine chown
BUILD=docker build --build-arg GO_IMAGE=$(GO_IMAGE) -t rpmbuild-$@/$(ARCH) -f $@/Dockerfile .
RPMBUILD=docker run --privileged --rm -i\
-v $(CURDIR)/rpmbuild/SOURCES:/root/rpmbuild/SOURCES \
-v $(CURDIR)/rpmbuild/RPMS:/root/rpmbuild/RPMS \
Expand All @@ -20,6 +21,7 @@ RPMBUILD_FLAGS=-ba\
--define '_version $(word 1,$(GEN_RPM_VER))' \
--define '_origversion $(word 4, $(GEN_RPM_VER))' \
SPECS/docker-ce.spec SPECS/docker-ce-cli.spec
RUN=$(RPMBUILD) rpmbuild-$@/$(ARCH) $(RPMBUILD_FLAGS)

SOURCE_FILES=containerd-proxy.tgz cli.tgz containerd-shim-process.tar docker.service dockerd.json
SOURCES=$(addprefix rpmbuild/SOURCES/, $(SOURCE_FILES))
Expand Down Expand Up @@ -50,24 +52,24 @@ centos: centos-7 ## build all centos rpm packages
fedora-28: ## build fedora-28 rpm packages
fedora-28: $(SOURCES)
$(CHOWN) -R root:root rpmbuild
docker build --build-arg GO_IMAGE=$(GO_IMAGE) -t rpmbuild-$@/$(ARCH) -f $@/Dockerfile.$(ARCH) .
$(RPMBUILD) rpmbuild-$@/$(ARCH) $(RPMBUILD_FLAGS)
$(BUILD)
$(RUN)
$(CHOWN) -R $(shell id -u):$(shell id -g) rpmbuild

.PHONY: fedora-27
fedora-27: ## build fedora-27 rpm packages
fedora-27: $(SOURCES)
$(CHOWN) -R root:root rpmbuild
docker build --build-arg GO_IMAGE=$(GO_IMAGE) -t rpmbuild-$@/$(ARCH) -f $@/Dockerfile.$(ARCH) .
$(RPMBUILD) rpmbuild-$@/$(ARCH) $(RPMBUILD_FLAGS)
$(BUILD)
$(RUN)
$(CHOWN) -R $(shell id -u):$(shell id -g) rpmbuild

.PHONY: centos-7
centos-7: ## build centos-7 rpm packages
centos-7: $(SOURCES)
$(CHOWN) -R root:root rpmbuild
docker build --build-arg GO_IMAGE=$(GO_IMAGE) -t rpmbuild-$@/$(ARCH) -f $@/Dockerfile.$(ARCH) .
$(RPMBUILD) rpmbuild-$@/$(ARCH) $(RPMBUILD_FLAGS)
$(BUILD)
$(RUN)
$(CHOWN) -R $(shell id -u):$(shell id -g) rpmbuild

rpmbuild/SOURCES/cli.tgz:
Expand Down
4 changes: 3 additions & 1 deletion rpm/centos-7/Dockerfile.aarch64 → rpm/centos-7/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ ENV PATH $PATH:/usr/local/go/bin:$GOPATH/bin
ENV AUTO_GOPATH 1
ENV DOCKER_BUILDTAGS pkcs11 seccomp selinux
ENV RUNC_BUILDTAGS seccomp selinux
COPY SPECS /root/rpmbuild/SPECS
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
Expand Down
17 changes: 0 additions & 17 deletions rpm/centos-7/Dockerfile.x86_64

This file was deleted.

File renamed without changes.
17 changes: 0 additions & 17 deletions rpm/fedora-27/Dockerfile.x86_64

This file was deleted.

File renamed without changes.
17 changes: 0 additions & 17 deletions rpm/fedora-28/Dockerfile.aarch64

This file was deleted.

0 comments on commit 0fd20b9

Please sign in to comment.