Skip to content
This repository was archived by the owner on Jan 21, 2020. It is now read-only.
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
19 changes: 18 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ PKGS := $(shell echo $(PKGS_AND_MOCKS) | tr ' ' '\n' | grep -v /mock$)

# Current working environment. Set these explicitly if you want to cross-compile
# in the build container (see the build-in-container target):

GOOS?=$(shell go env GOOS)
GOARCH?=$(shell go env GOARCH)
build-in-container: clean
Expand All @@ -37,6 +36,24 @@ build-in-container: clean
-v ${CURDIR}/build:/go/src/github.com/docker/infrakit/build \
infrakit-build

# For packaging as Docker container images. Set the environment variables DOCKER_PUSH, DOCKER_TAG_LATEST
# if also push to remote repo. You must have access to the remote repo.
DOCKER_IMAGE?=infrakit/bundle
DOCKER_TAG?=dev
build-docker:
@echo "+ $@"
GOOS=linux GOARCH=amd64 make build-in-container
@docker build --no-cache --pull \
-t ${DOCKER_IMAGE}:${DOCKER_TAG} \
-t ${DOCKER_IMAGE}:latest \
-f ${CURDIR}/dockerfiles/Dockerfile.bundle .
ifeq (${DOCKER_PUSH},true)
@docker push ${DOCKER_IMAGE}:${DOCKER_TAG}
ifeq (${DOCKER_TAG_LATEST},true)
@docker push ${DOCKER_IMAGE}:latest
endif
endif

get-tools:
@echo "+ $@"
@go get -u \
Expand Down
10 changes: 10 additions & 0 deletions dockerfiles/Dockerfile.bundle
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM alpine:3.4

# InfraKit bundle: a simple container for all of the default InfraKit executables

MAINTAINER David Chung <david.chung@docker.com>

RUN apk add --update ca-certificates && rm -Rf /tmp/* /var/lib/cache/apk/*
RUN mkdir /lib64 && ln -s /lib/libc.musl-x86_64.so.1 /lib64/ld-linux-x86-64.so.2

ADD build/* /usr/local/bin/