Skip to content

Commit 1f2052d

Browse files
committed
Remove vanity variant support completely
This was added so we could support the really-ancient-now "vanity" DockerCon variants of the image, `hello-seattle` and `hola-mundo`, neither of which have been supported/updated in a very long time (and never should've been to begin with).
1 parent c29a5d3 commit 1f2052d

File tree

31 files changed

+22
-33
lines changed

31 files changed

+22
-33
lines changed

Dockerfile.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,4 +141,4 @@ RUN set -ex; \
141141

142142
RUN find \( -name 'hello' -or -name 'hello.txt' -or -name '.host-arch' \) -exec file '{}' + -exec ls -lh '{}' +
143143

144-
CMD [".host-arch/hello-world/hello"]
144+
CMD [".host-arch/hello"]

Makefile

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ SHELL := bash -Eeuo pipefail
22

33
TARGET_ARCH := amd64
44
export ARCH_TEST :=
5-
C_TARGETS := $(addsuffix hello, $(wildcard $(TARGET_ARCH)/*/))
5+
HELLO := $(TARGET_ARCH)/hello
66

77
# norelro: https://stackoverflow.com/a/59084373/433558
88
export CFLAGS := -Os -fdata-sections -ffunction-sections -Wl,-z,norelro -s $(EXTRA_CFLAGS)
99
STRIP := $(CROSS_COMPILE)strip
1010

1111
.PHONY: all
12-
all: $(C_TARGETS)
12+
all: $(HELLO)
1313

1414
MUSL_SRC := /usr/local/src/musl
1515
MUSL_DIR := $(CURDIR)/musl/$(TARGET_ARCH)
@@ -23,11 +23,9 @@ $(MUSL_GCC):
2323
.PHONY: musl
2424
musl: $(MUSL_GCC)
2525

26-
$(C_TARGETS): hello.c $(MUSL_GCC)
26+
$(HELLO): hello.c $(MUSL_GCC)
2727
$(MUSL_GCC) $(CFLAGS) -Wl,--gc-sections -static \
2828
-o '$@' \
29-
-D DOCKER_IMAGE='"$(notdir $(@D))"' \
30-
-D DOCKER_GREETING="\"$$(cat 'greetings/$(notdir $(@D)).txt')\"" \
3129
-D DOCKER_ARCH='"$(TARGET_ARCH)"' \
3230
'$<'
3331
$(STRIP) --strip-all --remove-section=.comment '$@'
@@ -48,14 +46,13 @@ $(C_TARGETS): hello.c $(MUSL_GCC)
4846

4947
.PHONY: clean
5048
clean:
51-
-rm -vrf $(C_TARGETS) $(MUSL_DIR)
49+
-rm -vrf $(HELLO) $(MUSL_DIR)
5250

5351
.PHONY: test
54-
test: $(C_TARGETS)
52+
test: $(HELLO)
5553
@for b in $^; do \
5654
if [ -n "$$ARCH_TEST" ] && command -v arch-test > /dev/null && arch-test "$$ARCH_TEST" > /dev/null; then \
5755
( set -x && "./$$b" ); \
58-
( set -x && "./$$b" | grep -q '"'"$$(basename "$$(dirname "$$b")")"'"' ); \
5956
if [ ! -e .host-arch ] && arch-test -n "$$ARCH_TEST" > /dev/null; then \
6057
ln -svfT "$${b%%/*}" .host-arch; \
6158
fi; \
File renamed without changes.
File renamed without changes.

amd64/nanoserver-1809/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
FROM mcr.microsoft.com/windows/nanoserver:1809
2+
COPY hello.txt C:
3+
CMD ["cmd", "/C", "type C:\\hello.txt"]
File renamed without changes.

0 commit comments

Comments
 (0)