Skip to content
This repository has been archived by the owner on Oct 13, 2023. It is now read-only.

Commit

Permalink
Merge pull request #148 from dhiltgen/license_message
Browse files Browse the repository at this point in the history
Set up default product license for community engines
  • Loading branch information
seemethere authored Aug 21, 2018
2 parents a119f42 + 140dd86 commit 7195f21
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 4 deletions.
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ DOCKER_GITCOMMIT:=abcdefg
ARCH=$(shell uname -m)
STATIC_VERSION=$(shell static/gen-static-ver $(ENGINE_DIR) $(VERSION))
GO_VERSION:=1.10.3
DEFAULT_PRODUCT_LICENSE:=Community Engine
export DEFAULT_PRODUCT_LICENSE

# Taken from: https://www.cmcrossroads.com/article/printing-value-makefile-variable
print-% : ; @echo $($*)
Expand Down
12 changes: 10 additions & 2 deletions image/Dockerfile.engine
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,17 @@ FROM builder as dockerd-builder
WORKDIR /go/src/github.com/docker/docker
COPY . /go/src/github.com/docker/docker
ARG VERSION
ARG GITCOMMIT
ARG BUILDTIME
ARG PLATFORM
ARG PRODUCT
ARG DEFAULT_PRODUCT_LICENSE
ENV VERSION ${VERSION}
ARG DOCKER_GITCOMMIT
ENV DOCKER_GITCOMMIT ${DOCKER_GITCOMMIT}
ENV GITCOMMIT ${GITCOMMIT}
ENV BUILDTIME ${BUILDTIME}
ENV PLATFORM ${PLATFORM}
ENV PRODUCT ${PRODUCT}
ENV DEFAULT_PRODUCT_LICENSE ${DEFAULT_PRODUCT_LICENSE}
# TODO The way we set the version could easily be simplified not to depend on hack/...
RUN bash ./hack/make/.go-autogen
RUN go build -o /sbin/dockerd \
Expand Down
9 changes: 7 additions & 2 deletions image/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ STATIC_VERSION=$(shell ../static/gen-static-ver $(ENGINE_DIR) $(VERSION))
DOCKER_HUB_ORG?=dockereng
ARCH=$(shell uname -m)
ENGINE_IMAGE?=engine-community
DEFAULT_PRODUCT_LICENSE?=Community Engine

.PHONY: help
help: ## show make targets
Expand All @@ -27,8 +28,12 @@ $(ENGINE_DIR)/Dockerfile.engine:
# utilize manifests
image-linux: $(ENGINE_DIR)/Dockerfile.engine
docker build -t $(DOCKER_HUB_ORG)/$(ENGINE_IMAGE):$(STATIC_VERSION).$(ARCH) \
--build-arg VERSION=$(STATIC_VERSION) \
--build-arg DOCKER_GITCOMMIT=$$(cd $(ENGINE_DIR) && git rev-parse --short=7 HEAD) \
--build-arg VERSION="$(STATIC_VERSION)" \
--build-arg GITCOMMIT="$$(cd $(ENGINE_DIR) && git rev-parse --short=7 HEAD)" \
--build-arg BUILDTIME="$(BUILDTIME)" \
--build-arg PLATFORM="$(PLATFORM)" \
--build-arg PRODUCT="$(PRODUCT)" \
--build-arg DEFAULT_PRODUCT_LICENSE="$(DEFAULT_PRODUCT_LICENSE)" \
--file $< $(ENGINE_DIR)
echo $(DOCKER_HUB_ORG)/$(ENGINE_IMAGE):$(STATIC_VERSION).$(ARCH) > $@

Expand Down
1 change: 1 addition & 0 deletions static/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ STATIC_VERSION=$(shell ./gen-static-ver $(ENGINE_DIR) $(VERSION))
CHOWN=docker run --rm -v $(CURDIR):/v -w /v alpine chown
HASH_CMD=docker run -v $(CURDIR):/sum -w /sum debian:jessie bash hash_files
DIR_TO_HASH:=build/linux
DEFAULT_PRODUCT_LICENSE?=Community Engine

.PHONY: help
help: ## show make targets
Expand Down

0 comments on commit 7195f21

Please sign in to comment.