-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
48 lines (43 loc) · 1.64 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# See README.md and Dockerfile for explanations of these values.
FBSD_VERSION ?= $(shell grep '^ARG FBSD_VERSION=' Dockerfile | head -n 1 | cut -d = -f 2)
ifdef ALPINE_VERSION
ALPINE_VERSION_ARG := ALPINE_VERSION=$(ALPINE_VERSION)
endif
FBSD_VERSION_ARG := FBSD_VERSION=$(FBSD_VERSION)
ifdef FBSD_MIRROR
FBSD_MIRROR_ARG := FBSD_MIRROR=$(FBSD_MIRROR)
endif
ifdef FBSD_AMD64_BASE_URL
FBSD_AMD64_BASE_URL_ARG := FBSD_AMD64_BASE_URL=$(FBSD_AMD64_BASE_URL)
endif
ifdef FBSD_ARM64_BASE_URL
FBSD_ARM64_BASE_URL_ARG := FBSD_ARM64_BASE_URL=$(FBSD_ARM64_BASE_URL)
endif
ifdef FBSD_I386_BASE_URL
FBSD_I386_BASE_URL_ARG := FBSD_I386_BASE_URL=$(FBSD_I386_BASE_URL)
endif
# https://docs.docker.com/engine/reference/builder/#predefined-args
ifdef HTTP_PROXY
HTTP_PROXY_ARG := HTTP_PROXY=$(HTTP_PROXY)
endif
ifdef HTTPS_PROXY
HTTPS_PROXY_ARG := HTTPS_PROXY=$(HTTPS_PROXY)
endif
ifdef FTP_PROXY
FTP_PROXY_ARG := FTP_PROXY=$(FTP_PROXY)
endif
ifdef NO_PROXY
NO_PROXY_ARG := NO_PROXY=$(NO_PROXY)
endif
BUILD_ARGS := $(addprefix --build-arg ,$(ALPINE_VERSION_ARG) \
$(FBSD_VERSION_ARG) \
$(FBSD_MIRROR_ARG) \
$(FBSD_AMD64_BASE_URL_ARG) \
$(FBSD_ARM64_BASE_URL_ARG) \
$(FBSD_I386_BASE_URL_ARG) \
$(HTTP_PROXY) \
$(HTTPS_PROXY) \
$(FTP_PROXY) \
$(NO_PROXY))
freebsd-cross-build:
docker build --tag freebsd-cross-build:$(FBSD_VERSION) $(BUILD_ARGS) .