Skip to content

Commit

Permalink
Fixup #355
Browse files Browse the repository at this point in the history
Signed-off-by: Etienne Champetier <[email protected]>
  • Loading branch information
champtar committed Apr 10, 2020
1 parent bc55a65 commit 4b74a60
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Dockerfile.kube-dns
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM ARG_FROM
FROM ARG_FROM_BASE

MAINTAINER Bowei Du <[email protected]>

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.node-cache
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM ARG_FROM
FROM ARG_FROM_IPT
ADD bin/ARG_ARCH/ARG_BIN /ARG_BIN
EXPOSE 53 53/udp
EXPOSE 53 53/tcp
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.sidecar
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM ARG_FROM
FROM ARG_FROM_BASE

MAINTAINER Bowei Du <[email protected]>

Expand Down
9 changes: 3 additions & 6 deletions rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,8 @@ export VERSION
SRC_DIRS := cmd pkg

ALL_ARCH := amd64 arm arm64 ppc64le s390x
ifeq ($(BINARY),node-cache)
BASEIMAGE ?= k8s.gcr.io/debian-iptables-$(ARCH):v12.0.1
else
BASEIMAGE ?= k8s.gcr.io/debian-base-$(ARCH):v2.0.0
endif
IPTIMAGE ?= k8s.gcr.io/debian-iptables-$(ARCH):v12.0.1

# These rules MUST be expanded at reference time (hence '=') as BINARY
# is dynamically scoped.
Expand Down Expand Up @@ -122,7 +119,8 @@ define DOCKERFILE_RULE
-e 's|ARG_ARCH|$(ARCH)|g' \
-e 's|ARG_BIN|$(BINARY)|g' \
-e 's|ARG_REGISTRY|$(REGISTRY)|g' \
-e 's|ARG_FROM|$(BASEIMAGE)|g' \
-e 's|ARG_FROM_BASE|$(BASEIMAGE)|g' \
-e 's|ARG_FROM_IPT|$(IPTIMAGE)|g' \
-e 's|ARG_VERSION|$(VERSION)|g' \
$$< > $$@
.$(BUILDSTAMP_NAME)-container: .$(BINARY)-$(ARCH)-dockerfile
Expand All @@ -134,7 +132,6 @@ $(foreach BINARY,$(CONTAINER_BINARIES),$(eval $(DOCKERFILE_RULE)))
define CONTAINER_RULE
.$(BUILDSTAMP_NAME)-container: bin/$(ARCH)/$(BINARY)
@echo "container: bin/$(ARCH)/$(BINARY) ($(CONTAINER_NAME))"
@docker pull $(BASEIMAGE)
@docker build \
$(DOCKER_BUILD_FLAGS) \
-t $(CONTAINER_NAME):$(VERSION) \
Expand Down

0 comments on commit 4b74a60

Please sign in to comment.