Skip to content

Commit

Permalink
feat(minio): use minio's official docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
duanhongyi committed Nov 15, 2018
1 parent fdf8e87 commit 2ad99dc
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 20 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ SHORT_NAME := minio
REPO_PATH := github.com/deis/${SHORT_NAME}
DEV_ENV_IMAGE := quay.io/deis/go-dev:0.20.0
DEV_ENV_WORK_DIR := /go/src/${REPO_PATH}
DEV_ENV_PREFIX := docker run --rm -v ${CURDIR}:${DEV_ENV_WORK_DIR} -w ${DEV_ENV_WORK_DIR}
DEV_ENV_PREFIX := docker run --env CGO_ENABLED=0 --rm -v ${CURDIR}:${DEV_ENV_WORK_DIR} -w ${DEV_ENV_WORK_DIR}
DEV_ENV_CMD := ${DEV_ENV_PREFIX} ${DEV_ENV_IMAGE}

LDFLAGS := "-s -X main.version=${VERSION}"
Expand Down
6 changes: 0 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,6 @@ The Deis project welcomes contributions from all developers. The high level proc
* If your PR fixes any [issues][issues], make sure you write Fixes #1234 in your PR description (where #1234 is the number of the issue you're closing)
* The Deis core contributors will review your code. After each of them sign off on your code, they'll label your PR with `LGTM1` and `LGTM2` (respectively). Once that happens, you may merge.

## Minio Binary Mirror

Also, note that the [Dockerfile](rootfs/Dockerfile) uses an `ADD` directive to download pre-built Minio binaries from a [Google Cloud Storage bucket](https://console.cloud.google.com/storage/browser/minio-mirror/?project=deis-mirrors). The bucket is in the `deis-mirrors` project, and if you have access to that project, [this link](https://console.cloud.google.com/storage/browser/minio-mirror/?project=deis-mirrors) should take you directly to that bucket.

To bump this component to use a newer build of Minio, simply add a new binary to the bucket (under the `linux-amd64` folder), check the checkbox under the `Share publicly` column, and update the URL in the `ADD` directive in the aforementioned `Dockerfile`.

## Docker Based Development Environment

The preferred environment for development uses the [`go-dev` Docker image](https://github.com/deisthree/docker-go-dev). The tools described in this section are used to build, test, package and release each version of Deis.
Expand Down
26 changes: 13 additions & 13 deletions rootfs/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
FROM quay.io/deis/base:v0.3.6
FROM minio/mc:RELEASE.2018-11-06T01-12-20Z as mc

RUN adduser --system \
--shell /bin/bash \
--disabled-password \
--home /home/minio \
--group \
minio
FROM minio/minio:RELEASE.2018-11-06T01-01-02Z

COPY --from=mc /usr/bin/mc /usr/bin/mc

RUN adduser \
-s /bin/sh \
-D \
-h /home/minio \
minio \
minio

COPY . /

RUN curl -f -SL https://dl.minio.io/client/mc/release/linux-amd64/archive/mc.RELEASE.2018-11-06T01-12-20Z -o /usr/bin/mc \
&& chmod 755 /usr/bin/mc \
&& mkdir /home/minio/.minio \
&& chown minio:minio /home/minio/.minio
ADD https://dl.minio.io/server/minio/release/linux-amd64/minio.RELEASE.2018-11-06T01-01-02Z /bin/minio
RUN chmod 755 /bin/minio
RUN mkdir /home/minio/.minio \
&& chown minio:minio /home/minio/.minio

USER minio

Expand Down

0 comments on commit 2ad99dc

Please sign in to comment.