From 0e3c16b3e939dd6b409273d74b2733952ca02fc3 Mon Sep 17 00:00:00 2001 From: Aaron Schlesinger Date: Mon, 23 May 2016 16:07:06 -0700 Subject: [PATCH 1/4] chore(*): use official minio release --- Makefile | 6 +----- rootfs/Dockerfile | 4 +++- server/install.sh | 21 --------------------- 3 files changed, 4 insertions(+), 27 deletions(-) delete mode 100755 server/install.sh diff --git a/Makefile b/Makefile index ecb7e2e..ab2dad4 100644 --- a/Makefile +++ b/Makefile @@ -38,7 +38,7 @@ build: test: ${DEV_ENV_CMD} go test ${TEST_PACKAGES} -docker-build: build build-server +docker-build: build # copy the server binary from where it was built to the final image's file system. # note that the minio server is built as a dependency of this build target. cp server/minio ${BINDIR} @@ -50,10 +50,6 @@ docker-build: build build-server deploy: build docker-build docker-push kube-rc -# build the minio server -build-server: - docker run -e GO15VENDOREXPERIMENT=1 -e GOROOT=/usr/local/go --rm -v "${CURDIR}/server":/pwd -w /pwd golang:1.6 ./install.sh - mc-build: make -C mc build diff --git a/rootfs/Dockerfile b/rootfs/Dockerfile index 616b6b7..318fdb2 100644 --- a/rootfs/Dockerfile +++ b/rootfs/Dockerfile @@ -12,7 +12,9 @@ COPY . / RUN curl -f -SL https://dl.minio.io/client/mc/release/linux-amd64/archive/mc.OFFICIAL.2015-09-05T23-43-46Z -o /usr/bin/mc \ && chmod 755 /usr/bin/mc \ && mkdir /home/minio/.minio \ - && chown minio:minio /home/minio/.minio + && chown minio:minio /home/minio/.minio \ + && curl https://dl.minio.io/server/minio/release/linux-amd64/minio > /bin/minio + && chmod 755 bin/minio USER minio diff --git a/server/install.sh b/server/install.sh deleted file mode 100755 index 24f8c42..0000000 --- a/server/install.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash - -# This script builds the minio server (https://github.com/minio/minio) inside a Docker container. It should be run inside a golang:1.5.2 container, with the following environment variables set. -# -# - GOROOT=/usr/local/go -# - GO15VENDOREXPERIMENT=1 -# -# It also expects the current directory (mc/) to be mounted at /pwd, and for /pwd to be the current working directory -# -# See the 'mc' build target in the Makefile (in the parent directory) for an example of how to use this script. - -apt-get update && apt-get install -yq yasm -mkdir -p $GOPATH/src/github.com/minio -cd $GOPATH/src/github.com/minio -git clone -b master --single-branch https://github.com/minio/minio.git minio -cd minio -git reset --hard 356b889 -# HACK remove the "go vet" installation line -sed -i.bak '63 d' Makefile -make install -cp $GOPATH/bin/minio /pwd/minio From e42f0cac877f0d9adfb88f6ccf41158ea02629e0 Mon Sep 17 00:00:00 2001 From: Aaron Schlesinger Date: Mon, 23 May 2016 16:10:04 -0700 Subject: [PATCH 2/4] fix(Makefile): remove copy command from custom-built minio server --- Makefile | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Makefile b/Makefile index ab2dad4..ceee0a1 100644 --- a/Makefile +++ b/Makefile @@ -39,10 +39,6 @@ test: ${DEV_ENV_CMD} go test ${TEST_PACKAGES} docker-build: build - # copy the server binary from where it was built to the final image's file system. - # note that the minio server is built as a dependency of this build target. - cp server/minio ${BINDIR} - # build the main image docker build --rm -t ${IMAGE} rootfs docker tag -f ${IMAGE} ${MUTABLE_IMAGE} From 801419f445d0d805dfe79db5a0a6377ceb3a16be Mon Sep 17 00:00:00 2001 From: Aaron Schlesinger Date: Mon, 23 May 2016 16:12:31 -0700 Subject: [PATCH 3/4] fix(Dockerfile): add line continuation --- rootfs/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rootfs/Dockerfile b/rootfs/Dockerfile index 318fdb2..ad113ed 100644 --- a/rootfs/Dockerfile +++ b/rootfs/Dockerfile @@ -13,7 +13,7 @@ RUN curl -f -SL https://dl.minio.io/client/mc/release/linux-amd64/archive/mc.OFF && chmod 755 /usr/bin/mc \ && mkdir /home/minio/.minio \ && chown minio:minio /home/minio/.minio \ - && curl https://dl.minio.io/server/minio/release/linux-amd64/minio > /bin/minio + && curl https://dl.minio.io/server/minio/release/linux-amd64/minio > /bin/minio \ && chmod 755 bin/minio USER minio From 2ba1109fc511a35ac23d08eb27a601eeada7697c Mon Sep 17 00:00:00 2001 From: Aaron Schlesinger Date: Wed, 25 May 2016 10:30:30 -0700 Subject: [PATCH 4/4] fix(Dockerfile): download a fixed minio release version --- rootfs/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rootfs/Dockerfile b/rootfs/Dockerfile index ad113ed..e98bb84 100644 --- a/rootfs/Dockerfile +++ b/rootfs/Dockerfile @@ -13,7 +13,7 @@ RUN curl -f -SL https://dl.minio.io/client/mc/release/linux-amd64/archive/mc.OFF && chmod 755 /usr/bin/mc \ && mkdir /home/minio/.minio \ && chown minio:minio /home/minio/.minio \ - && curl https://dl.minio.io/server/minio/release/linux-amd64/minio > /bin/minio \ + && curl https://dl.minio.io/server/minio/release/linux-amd64/minio.RELEASE.2016-04-17T22-09-24Z > /bin/minio \ && chmod 755 bin/minio USER minio