Skip to content
This repository has been archived by the owner on Sep 6, 2022. It is now read-only.

Add multiarch docker options #59

Merged
merged 2 commits into from
Sep 26, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docker-plugin/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM golang:1.8-stretch
ARG ARCH
FROM ${ARCH}/golang:1.8-stretch

WORKDIR /go/src/github.com/minio

Expand Down
3 changes: 2 additions & 1 deletion docker-plugin/Dockerfile.release
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM golang:1.8-stretch
ARG ARCH
FROM ${ARCH}/golang:1.8-stretch

WORKDIR /go/src/github.com/minio

Expand Down
3 changes: 2 additions & 1 deletion docker-plugin/Dockerfile.rootfs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM golang:1.8-stretch
ARG ARCH
FROM ${ARCH}/golang:1.8-stretch

COPY . /go/src/github.com/minio/minfs-docker-plugin
WORKDIR /go/src/github.com/minio/minfs-docker-plugin
Expand Down
10 changes: 6 additions & 4 deletions docker-plugin/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
PLUGIN_NAME=minio/minfs
PLUGIN_TAG=latest
PLUGIN_ARCH=amd64 # known namespaces: https://github.com/docker-library/official-images#architectures-other-than-amd64

# Default is to build development plugin.
all: clean docker rootfs create-edge
Expand All @@ -12,7 +14,7 @@ clean:

docker:
@echo "### docker build: builder image"
@docker build -q -t builder -f Dockerfile.rootfs .
@docker build --build-arg ARCH=${PLUGIN_ARCH} -q -t builder -f Dockerfile.rootfs .
@echo "### extract minfs-docker-plugin"
@docker create --name tmp builder
@docker cp tmp:/go/bin/minfs-docker-plugin .
Expand All @@ -31,18 +33,18 @@ docker:
@cp -a ../vendor minfs
@cp -a ../.git minfs
@echo "### docker build: rootfs image with minfs-docker-plugin"
@docker build -t ${PLUGIN_NAME}:rootfs .
@docker build --build-arg ARCH=${PLUGIN_ARCH} -t ${PLUGIN_NAME}:rootfs .

docker-release:
@echo "### docker build: builder image"
@docker build -q -t builder -f Dockerfile.rootfs .
@docker build --build-arg ARCH=${PLUGIN_ARCH} -q -t builder -f Dockerfile.rootfs .
@echo "### extract minfs-docker-plugin"
@docker create --name tmp builder
@docker cp tmp:/go/bin/minfs-docker-plugin .
@docker rm -vf tmp
@docker rmi builder
@echo "### docker build: rootfs image with minfs-docker-plugin"
@docker build -f Dockerfile.release -q -t ${PLUGIN_NAME}:rootfs .
@docker build --build-arg ARCH=${PLUGIN_ARCH} -f Dockerfile.release -q -t ${PLUGIN_NAME}:rootfs .

rootfs:
@echo "### create rootfs directory in ./plugin/rootfs"
Expand Down