Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

don't use alpine for testing #1840

Merged
merged 2 commits into from
Feb 8, 2023
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
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ ARCH ?= amd64
ALL_ARCH := amd64

# Image to use for building.
BUILD_IMAGE ?= golang:1.18-alpine
BUILD_IMAGE ?= golang:1.18
# Containers will be named: $(CONTAINER_PREFIX)-$(BINARY)-$(ARCH):$(VERSION).
CONTAINER_PREFIX ?= ingress-gce

Expand Down
2 changes: 1 addition & 1 deletion build/build.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
#
# Copyright 2016 The Kubernetes Authors.
#
Expand Down
18 changes: 0 additions & 18 deletions build/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -40,22 +40,6 @@ SRC_DIRS := cmd pkg

ALL_ARCH ?= amd64 arm arm64 ppc64le s390x
NOBODY ?= nobody
# Set default base image dynamically for each arch
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you remove this switch?
the golang:1.18 is na multiarch image?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's in the commit message 😄 , the BASEIMAGE parameter is not being used, at least I don't know where, it must be a legacy thing, because the sed below replaces ARG_FROM for BASEIMAGE, but there is no ARG_FROM 🤷

grep ARG Dockerfile.*
Dockerfile.404-server:ADD bin/ARG_ARCH/ARG_BIN /ARG_BIN
Dockerfile.404-server:ENTRYPOINT ["/ARG_BIN"]
Dockerfile.404-server-with-metrics:ADD bin/ARG_ARCH/ARG_BIN /ARG_BIN
Dockerfile.404-server-with-metrics:ENTRYPOINT ["/ARG_BIN"]
Dockerfile.e2e-test:ADD bin/ARG_ARCH/ARG_BIN /ARG_BIN
Dockerfile.echo:ADD bin/ARG_ARCH/ARG_BIN /ARG_BIN
Dockerfile.echo:ENTRYPOINT ["/ARG_BIN"]
Dockerfile.fuzzer:ADD bin/ARG_ARCH/ARG_BIN /ARG_BIN
Dockerfile.fuzzer:ENTRYPOINT ["/ARG_BIN"]
Dockerfile.glbc:ADD bin/ARG_ARCH/ARG_BIN /ARG_BIN
Dockerfile.glbc:ENTRYPOINT ["/ARG_BIN"]
Dockerfile.workload-controller:ADD bin/ARG_ARCH/ARG_BIN /ARG_BIN
Dockerfile.workload-controller:ENTRYPOINT ["/ARG_BIN"]
Dockerfile.workload-daemon:ADD bin/ARG_ARCH/ARG_BIN /ARG_BIN
Dockerfile.workload-daemon:ENTRYPOINT ["/ARG_BIN"]

ifeq ($(ARCH),amd64)
BASEIMAGE?=alpine
endif
ifeq ($(ARCH),arm)
BASEIMAGE?=arm32v6/alpine
endif
ifeq ($(ARCH),arm64)
BASEIMAGE?=arm64v8/alpine
endif
ifeq ($(ARCH),ppc64le)
BASEIMAGE?=ppc64le/alpine
endif
ifeq ($(ARCH),s390x)
BASEIMAGE?=s390x/alpine
endif

# These rules MUST be expanded at reference time (hence '=') as BINARY
# is dynamically scoped.
Expand Down Expand Up @@ -141,7 +125,6 @@ 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_NOBODY|$(NOBODY)|g' \
-e 's|ARG_VERSION|$(VERSION)|g' \
$$< > $$@
Expand All @@ -154,7 +137,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
2 changes: 1 addition & 1 deletion build/test.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
#
# Copyright 2016 The Kubernetes Authors.
#
Expand Down