Artifact
189932f934e6cf1b03f02c4a6d5c254b43a104676df7b4afc24311c13aa06ef9 :
File
iperf3/Makefile
— part of check-in
[00f2b79681]
at
2023-12-04 06:08:04
on branch trunk
— Updated iperf3 container to 3.16
(user:
tangent
size: 1182)
0000: 23 20 43 6f 6e 74 61 69 6e 65 72 20 62 61 73 65 # Container base
0010: 20 6e 61 6d 65 0a 4e 41 4d 45 20 3a 3d 20 69 70 name.NAME := ip
0020: 65 72 66 33 0a 54 41 52 42 41 4c 4c 20 3a 3d 20 erf3.TARBALL :=
0030: 24 28 4e 41 4d 45 29 2e 74 61 72 0a 0a 23 20 56 $(NAME).tar..# V
0040: 65 72 73 69 6f 6e 20 74 6f 20 63 6c 6f 6e 65 20 ersion to clone
0050: 61 6e 64 20 62 75 69 6c 64 2e 20 20 59 6f 75 20 and build. You
0060: 63 61 6e 20 75 73 65 20 61 6e 79 20 76 61 6c 69 can use any vali
0070: 64 20 74 61 67 20 6f 6e 20 74 68 65 20 75 70 73 d tag on the ups
0080: 74 72 65 61 6d 0a 23 20 68 74 74 70 73 3a 2f 2f tream.# https://
0090: 67 69 74 68 75 62 2e 63 6f 6d 2f 65 73 6e 65 74 github.com/esnet
00a0: 2f 69 70 65 72 66 2f 20 72 65 70 6f 2e 0a 56 45 /iperf/ repo..VE
00b0: 52 53 49 4f 4e 20 3a 3d 20 33 2e 31 36 0a 0a 23 RSION := 3.16..#
00c0: 20 49 6d 61 67 65 20 72 65 70 6f 20 70 72 65 66 Image repo pref
00d0: 69 78 20 74 6f 20 75 73 65 20 66 6f 72 20 22 70 ix to use for "p
00e0: 75 73 68 22 0a 49 4d 47 52 45 50 4f 20 3a 3d 20 ush".IMGREPO :=
00f0: 74 61 6e 67 65 6e 74 73 6f 66 74 0a 4c 4e 49 4e tangentsoft.LNIN
0100: 41 4d 45 20 3a 3d 20 24 28 49 4d 47 52 45 50 4f AME := $(IMGREPO
0110: 29 2f 24 28 4e 41 4d 45 29 3a 6c 61 74 65 73 74 )/$(NAME):latest
0120: 0a 4c 56 49 4e 41 4d 45 20 3a 3d 20 24 28 49 4d .LVINAME := $(IM
0130: 47 52 45 50 4f 29 2f 24 28 4e 41 4d 45 29 3a 76 GREPO)/$(NAME):v
0140: 24 28 56 45 52 53 49 4f 4e 29 0a 0a 23 20 54 68 $(VERSION)..# Th
0150: 65 20 6c 69 73 74 20 6f 66 20 70 6c 61 74 66 6f e list of platfo
0160: 72 6d 73 20 77 65 20 62 75 69 6c 64 20 74 68 65 rms we build the
0170: 20 63 6f 6e 74 61 69 6e 65 72 20 66 6f 72 2e 20 container for.
0180: 20 49 74 20 73 68 6f 75 6c 64 20 63 6f 76 65 72 It should cover
0190: 20 39 39 25 0a 23 20 6f 66 20 61 6c 6c 20 70 72 99%.# of all pr
01a0: 61 63 74 69 63 61 6c 20 75 73 65 20 63 61 73 65 actical use case
01b0: 73 2e 0a 50 4c 41 54 46 4f 52 4d 53 20 3a 3d 20 s..PLATFORMS :=
01c0: 6c 69 6e 75 78 2f 78 38 36 5f 36 34 2c 6c 69 6e linux/x86_64,lin
01d0: 75 78 2f 69 33 38 36 2c 6c 69 6e 75 78 2f 61 72 ux/i386,linux/ar
01e0: 6d 2c 6c 69 6e 75 78 2f 61 72 6d 36 34 0a 0a 23 m,linux/arm64..#
01f0: 20 43 72 65 61 74 65 20 4f 43 49 20 69 6d 61 67 Create OCI imag
0200: 65 20 69 6e 20 62 75 69 6c 64 20 63 61 63 68 65 e in build cache
0210: 0a 24 28 54 41 52 42 41 4c 4c 29 3a 20 44 6f 63 .$(TARBALL): Doc
0220: 6b 65 72 66 69 6c 65 20 4d 61 6b 65 66 69 6c 65 kerfile Makefile
0230: 0a 09 64 6f 63 6b 65 72 20 62 75 69 6c 64 20 5c ..docker build \
0240: 0a 09 09 2d 2d 62 75 69 6c 64 2d 61 72 67 20 56 ...--build-arg V
0250: 45 52 53 49 4f 4e 3d 24 28 56 45 52 53 49 4f 4e ERSION=$(VERSION
0260: 29 20 5c 0a 09 09 2d 2d 70 6c 61 74 66 6f 72 6d ) \...--platform
0270: 20 24 28 50 4c 41 54 46 4f 52 4d 53 29 20 5c 0a $(PLATFORMS) \.
0280: 09 09 2d 2d 74 61 67 20 24 28 4c 4e 49 4e 41 4d ..--tag $(LNINAM
0290: 45 29 20 5c 0a 09 09 2d 2d 74 61 67 20 24 28 4c E) \...--tag $(L
02a0: 56 49 4e 41 4d 45 29 20 5c 0a 09 09 24 28 44 42 VINAME) \...$(DB
02b0: 46 4c 41 47 53 29 20 2e 0a 09 64 6f 63 6b 65 72 FLAGS) ...docker
02c0: 20 69 6d 61 67 65 20 73 61 76 65 20 24 28 4c 56 image save $(LV
02d0: 49 4e 41 4d 45 29 20 3e 20 24 40 0a 0a 23 20 52 INAME) > $@..# R
02e0: 65 6d 6f 76 65 20 62 75 69 6c 64 20 6f 75 74 70 emove build outp
02f0: 75 74 73 0a 63 6c 65 61 6e 3a 0a 09 72 6d 20 2d uts.clean:..rm -
0300: 66 20 24 28 54 41 52 42 41 4c 4c 29 0a 09 2d 64 f $(TARBALL)..-d
0310: 6f 63 6b 65 72 20 69 6d 61 67 65 20 72 6d 20 24 ocker image rm $
0320: 28 4c 56 49 4e 41 4d 45 29 0a 09 2d 64 6f 63 6b (LVINAME)..-dock
0330: 65 72 20 69 6d 61 67 65 20 72 6d 20 24 28 4e 41 er image rm $(NA
0340: 4d 45 29 3a 6c 61 74 65 73 74 0a 0a 6c 6f 67 69 ME):latest..logi
0350: 6e 3a 0a 09 64 6f 63 6b 65 72 20 6c 6f 67 69 6e n:..docker login
0360: 0a 0a 23 20 50 75 73 68 20 74 68 65 20 62 75 69 ..# Push the bui
0370: 6c 74 20 63 6f 6e 74 61 69 6e 65 72 20 62 75 6e lt container bun
0380: 64 6c 65 0a 70 75 73 68 3a 20 24 28 54 41 52 42 dle.push: $(TARB
0390: 41 4c 4c 29 0a 09 64 6f 63 6b 65 72 20 70 75 73 ALL)..docker pus
03a0: 68 20 24 28 4c 4e 49 4e 41 4d 45 29 0a 09 64 6f h $(LNINAME)..do
03b0: 63 6b 65 72 20 70 75 73 68 20 24 28 4c 56 49 4e cker push $(LVIN
03c0: 41 4d 45 29 0a 0a 23 20 52 75 6e 20 74 68 65 20 AME)..# Run the
03d0: 6e 61 74 69 76 65 20 76 65 72 73 69 6f 6e 20 6f native version o
03e0: 66 20 74 68 65 20 62 75 69 6c 74 20 63 6f 6e 74 f the built cont
03f0: 61 69 6e 65 72 20 6c 6f 63 61 6c 6c 79 2c 20 66 ainer locally, f
0400: 6f 72 20 74 65 73 74 69 6e 67 0a 72 75 6e 3a 0a or testing.run:.
0410: 09 64 6f 63 6b 65 72 20 72 75 6e 20 24 28 44 52 .docker run $(DR
0420: 46 4c 41 47 53 29 20 5c 0a 09 09 2d 2d 72 6d 20 FLAGS) \...--rm
0430: 5c 0a 09 09 2d 2d 74 74 79 20 5c 0a 09 09 2d 2d \...--tty \...--
0440: 69 6e 74 65 72 61 63 74 69 76 65 20 5c 0a 09 09 interactive \...
0450: 2d 2d 70 75 62 6c 69 73 68 20 35 32 30 31 3a 35 --publish 5201:5
0460: 32 30 31 2f 74 63 70 20 5c 0a 09 09 2d 2d 70 75 201/tcp \...--pu
0470: 62 6c 69 73 68 20 35 32 30 31 3a 35 32 30 31 2f blish 5201:5201/
0480: 75 64 70 20 5c 0a 09 09 24 28 4c 56 49 4e 41 4d udp \...$(LVINAM
0490: 45 29 20 24 28 45 50 46 4c 41 47 53 29 0a E) $(EPFLAGS).