Last active
August 29, 2015 14:06
-
-
Save vbatts/7566907ef6dd620636f0 to your computer and use it in GitHub Desktop.
centos7 builds of go1.3.1 and docker 1.2
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
#!/bin/sh | |
set -e | |
DOCKER=${DOCKER:-docker} | |
NAME=${NAME:-docker-rpm-build} | |
cat Dockerfile | ${DOCKER} build -t ${NAME} - | |
${DOCKER} run -it -v $(pwd)/output:/output ${NAME} cp -pav /rpmbuild/RPMS /output |
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
FROM centos:latest | |
RUN yum groupinstall -y "development tools" && \ | |
yum install -y yum-utils wget | |
RUN wget https://kojipkgs.fedoraproject.org//packages/golang/1.3.1/3.fc22/src/golang-1.3.1-3.fc22.src.rpm \ | |
https://kojipkgs.fedoraproject.org//packages/docker-io/1.2.0/2.fc22/src/docker-io-1.2.0-2.fc22.src.rpm \ | |
https://kojipkgs.fedoraproject.org//packages/golang-github-coreos-go-systemd/2/1.el7/src/golang-github-coreos-go-systemd-2-1.el7.src.rpm \ | |
https://kojipkgs.fedoraproject.org//packages/golang-github-docker-libcontainer/1.1.0/10.gitdb65c35.fc22/src/golang-github-docker-libcontainer-1.1.0-10.gitdb65c35.fc22.src.rpm \ | |
https://kojipkgs.fedoraproject.org//packages/golang-github-gorilla-mux/0/0.15.git136d54f.fc22/src/golang-github-gorilla-mux-0-0.15.git136d54f.fc22.src.rpm \ | |
https://kojipkgs.fedoraproject.org//packages/golang-github-syndtr-gocapability/0/0.8.git3c85049.fc22/src/golang-github-syndtr-gocapability-0-0.8.git3c85049.fc22.src.rpm \ | |
https://kojipkgs.fedoraproject.org//packages/golang-github-tchap-go-patricia/1.0.1/4.fc22/src/golang-github-tchap-go-patricia-1.0.1-4.fc22.src.rpm | |
RUN yum-builddep -y ./golang-1.3.1-3.fc22.src.rpm | |
RUN rpmbuild --rebuild ./golang-1.3.1-3.fc22.src.rpm | |
RUN rpm -Uvh /rpmbuild/RPMS/x86_64/golang-1.3.1-3.el7.centos.x86_64.rpm \ | |
/rpmbuild/RPMS/x86_64/golang-pkg-bin-linux-amd64-1.3.1-3.el7.centos.x86_64.rpm \ | |
/rpmbuild/RPMS/noarch/golang-src-1.3.1-3.el7.centos.noarch.rpm \ | |
/rpmbuild/RPMS/noarch/golang-pkg-linux-amd64-1.3.1-3.el7.centos.noarch.rpm | |
RUN yum-builddep -y ./golang-github-gorilla-mux-0-0.15.git136d54f.fc22.src.rpm && rpmbuild --rebuild ./golang-github-gorilla-mux-0-0.15.git136d54f.fc22.src.rpm | |
RUN rpm -Uvh /rpmbuild/RPMS/noarch/golang-github-gorilla-mux-devel-0-0.15.git136d54f.el7.centos.noarch.rpm | |
RUN yum-builddep -y ./golang-github-syndtr-gocapability-0-0.8.git3c85049.fc22.src.rpm && rpmbuild --rebuild ./golang-github-syndtr-gocapability-0-0.8.git3c85049.fc22.src.rpm | |
RUN rpm -Uvh /rpmbuild/RPMS/x86_64/golang-github-syndtr-gocapability-devel-0-0.8.git3c85049.el7.centos.x86_64.rpm | |
RUN yum-builddep -y ./golang-github-tchap-go-patricia-1.0.1-4.fc22.src.rpm && rpmbuild --rebuild ./golang-github-tchap-go-patricia-1.0.1-4.fc22.src.rpm | |
RUN rpm -Uvh /rpmbuild/RPMS/noarch/golang-github-tchap-go-patricia-devel-1.0.1-4.el7.centos.noarch.rpm | |
RUN yum-builddep -y ./golang-github-coreos-go-systemd-2-1.el7.src.rpm && rpmbuild --rebuild ./golang-github-coreos-go-systemd-2-1.el7.src.rpm | |
RUN rpm -Uvh /rpmbuild/RPMS/noarch/golang-github-coreos-go-systemd-devel-2-1.el7.centos.noarch.rpm | |
RUN wget https://kojipkgs.fedoraproject.org//packages/golang-github-codegangsta-cli/1.2.0/1.el7/src/golang-github-codegangsta-cli-1.2.0-1.el7.src.rpm | |
RUN yum-builddep -y ./golang-github-codegangsta-cli-1.2.0-1.el7.src.rpm && rpmbuild --rebuild ./golang-github-codegangsta-cli-1.2.0-1.el7.src.rpm | |
RUN rpm -Uvh /rpmbuild/RPMS/noarch/golang-github-codegangsta-cli-devel-1.2.0-1.el7.centos.noarch.rpm | |
# shit. cyclic-dep between docker and libcontainer. | |
# ugly, but will work in a pinch :-\ | |
RUN rpm -Uvh https://kojipkgs.fedoraproject.org//packages/docker-io/1.2.0/2.fc22/x86_64/docker-io-pkg-devel-1.2.0-2.fc22.x86_64.rpm | |
RUN yum-builddep -y ./golang-github-docker-libcontainer-1.1.0-10.gitdb65c35.fc22.src.rpm && rpmbuild --rebuild ./golang-github-docker-libcontainer-1.1.0-10.gitdb65c35.fc22.src.rpm | |
RUN rpm -Uvh /rpmbuild/RPMS/x86_64/golang-github-docker-libcontainer-devel-1.1.0-10.gitdb65c35.el7.centos.x86_64.rpm | |
# pandoc ... holy moly | |
RUN rpm -Uvh http://download-i2.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-1.noarch.rpm | |
RUN yum install -y https://kojipkgs.fedoraproject.org//packages/pandoc/1.12.3.1/1.el7/x86_64/pandoc-1.12.3.1-1.el7.x86_64.rpm | |
# because systemd | |
RUN yum remove -y fakesystemd && yum install -y systemd | |
RUN yum-builddep -y ./docker-io-1.2.0-2.fc22.src.rpm && rpmbuild --rebuild ./docker-io-1.2.0-2.fc22.src.rpm |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment