diff --git a/Makefile b/Makefile index ecb7e2e..ceee0a1 100644 --- a/Makefile +++ b/Makefile @@ -38,11 +38,7 @@ build: test: ${DEV_ENV_CMD} go test ${TEST_PACKAGES} -docker-build: build build-server - # 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} - +docker-build: build # build the main image docker build --rm -t ${IMAGE} rootfs docker tag -f ${IMAGE} ${MUTABLE_IMAGE} @@ -50,10 +46,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..e98bb84 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.RELEASE.2016-04-17T22-09-24Z > /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