Giuseppe Lavagetto has uploaded a new change for review. https://gerrit.wikimedia.org/r/321614
Change subject: Allow building upon wikimedia-jessie (cherry picked from commit d34224be54cf5fc274fea426925af774fb7af8d0) ...................................................................... Allow building upon wikimedia-jessie (cherry picked from commit d34224be54cf5fc274fea426925af774fb7af8d0) Change-Id: I10c87d1e9e56206bafcddb8cffd0dcd63bda0822 --- M Makefile A calico_node/Dockerfile.debian 2 files changed, 39 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/calico-containers refs/changes/14/321614/1 diff --git a/Makefile b/Makefile index db8bb16..38bdafa 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -.PHONY: all binary calico/node test ut ut-circle st st-ssl clean run-etcd run-etcd-ssl help clean_calico_node +.PHONY: all binary calico/node calico/node.debian test ut ut-circle st st-ssl clean run-etcd run-etcd-ssl help clean_calico_node default: help all: test ## Run all the tests test: st test-containerized ## Run all the tests @@ -34,6 +34,7 @@ NODE_CONTAINER_FILES=$(shell find $(NODE_CONTAINER_DIR)/filesystem -type f) # we can pass --build-arg during node image building NODE_CONTAINER_BUILD_ARGS?= +NODE_DOCKERFILE?=Dockerfile.debian NODE_CONTAINER_CREATED=$(NODE_CONTAINER_DIR)/.calico_node.created NODE_CONTAINER_BIN_DIR=$(NODE_CONTAINER_DIR)/filesystem/bin NODE_CONTAINER_BINARIES=startup allocate-ipip-addr calico-felix bird calico-bgp-daemon confd libnetwork-plugin @@ -45,14 +46,17 @@ calico-node.tar: $(NODE_CONTAINER_CREATED) docker save --output $@ $(NODE_CONTAINER_NAME) +calico/node.debian: NODE_DOCKERFILE=Dockerfile.debian +calico/node.debian: $(NODE_CONTAINER_CREATED) + # Build ACI (the APPC image file format) of calico/node. # Requires docker2aci installed on host: https://github.com/appc/docker2aci calico-node-latest.aci: calico-node.tar docker2aci $< # Build calico/node docker image - explicitly depend on the container binaries. -$(NODE_CONTAINER_CREATED): $(NODE_CONTAINER_DIR)/Dockerfile $(NODE_CONTAINER_FILES) $(addprefix $(NODE_CONTAINER_BIN_DIR)/,$(NODE_CONTAINER_BINARIES)) - docker build $(NODE_CONTAINER_BUILD_ARGS) -t $(NODE_CONTAINER_NAME) $(NODE_CONTAINER_DIR) +$(NODE_CONTAINER_CREATED): $(NODE_CONTAINER_DIR)/$(NODE_DOCKERFILE) $(NODE_CONTAINER_FILES) $(addprefix $(NODE_CONTAINER_BIN_DIR)/,$(NODE_CONTAINER_BINARIES)) + docker build $(NODE_CONTAINER_BUILD_ARGS) -t $(NODE_CONTAINER_NAME) -f $(NODE_CONTAINER_DIR)/$(NODE_DOCKERFILE) $(NODE_CONTAINER_DIR) touch $@ # Build binary from python files, e.g. startup.py or allocate-ipip-addr.py diff --git a/calico_node/Dockerfile.debian b/calico_node/Dockerfile.debian new file mode 100644 index 0000000..6dc7c9b --- /dev/null +++ b/calico_node/Dockerfile.debian @@ -0,0 +1,32 @@ +# Copyright (c) 2016 Wikimedia Foundation. All rights reserved. +# Original dockerfile (c) 2016 Tigera Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +FROM docker-registry.wikimedia.org/wikimedia-jessie +MAINTAINER Giuseppe Lavagetto <j...@wikimedia.org> + +# Set the minimum Docker API version required for libnetwork. +ENV DOCKER_API_VERSION 1.21 + +RUN apt-get update && \ + apt-get install -y ca-certificates runit && \ + apt-get install -y conntrack iptables ipset iproute2 "iputils-*" nfct + +# Copy "shared directory" which can be used to pass custom files (local git repos, +# that can be used by pip install git+file:///) +COPY node_share /tmp/node_share + +# Copy in the filesystem - this contains felix, bird, gobgp etc... +COPY filesystem / + +CMD ["start_runit"] -- To view, visit https://gerrit.wikimedia.org/r/321614 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I10c87d1e9e56206bafcddb8cffd0dcd63bda0822 Gerrit-PatchSet: 1 Gerrit-Project: operations/calico-containers Gerrit-Branch: 1.0.0-beta-rc5 Gerrit-Owner: Giuseppe Lavagetto <glavage...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits