@@ -15,58 +15,49 @@ VERSION_minimal ?=
15
15
CONTAINER_minimal ?= debian:bullseye-slim
16
16
CONFIGURE_minimal ?=
17
17
INSTALL_minimal ?= version
18
- define COPY_minimal
19
- endef
18
+ RUN_minimal ?= /bin/true
20
19
21
20
VERSION_go ?= 1.19
22
21
CONTAINER_go ?= golang:$(VERSION_go )
23
22
CONFIGURE_go ?= go --go-path=$$GOPATH
24
23
INSTALL_go ?= go-install-src libunit-install
25
- define COPY_go
26
- COPY --from=BUILDER /usr/lib/\*-linux-gnu/libunit.a /tmp/\n\$
27
- COPY --from=BUILDER /usr/include/nxt_* /usr/include/\n\$
28
- COPY --from=BUILDER /go/src/ /go/src/
29
- endef
24
+ RUN_go ?= /bin/true
30
25
31
26
VERSION_jsc ?= 11
32
27
CONTAINER_jsc ?= eclipse-temurin:$(VERSION_jsc ) -jdk
33
28
CONFIGURE_jsc ?= java --jars=/usr/share/unit-jsc-common/
34
29
INSTALL_jsc ?= java-shared-install java-install
35
- COPY_jsc = COPY --from=BUILDER /usr/share/unit-jsc-common/ /usr/share/unit-jsc-common/
30
+ RUN_jsc ? = /bin/true
36
31
37
32
VERSION_node ?= 18
38
33
CONTAINER_node ?= node:$(VERSION_node )
39
34
CONFIGURE_node ?= nodejs --node-gyp=/usr/local/lib/node_modules/npm/bin/node-gyp-bin/node-gyp
40
35
INSTALL_node ?= node node-install libunit-install
41
- define COPY_node
42
- COPY --from=BUILDER /usr/lib/\*-linux-gnu/libunit.a /tmp/\n\$
43
- COPY --from=BUILDER /usr/include/nxt_* /usr/include/\n\$
44
- COPY --from=BUILDER /usr/local/lib/node_modules/unit-http/ /usr/local/lib/node_modules/unit-http/
45
- endef
36
+ RUN_node ?= /bin/true
46
37
47
38
VERSION_perl ?= 5.36
48
39
CONTAINER_perl ?= perl:$(VERSION_perl )
49
40
CONFIGURE_perl ?= perl
50
41
INSTALL_perl ?= perl-install
51
- COPY_perl =
42
+ RUN_perl ?= /bin/true
52
43
53
44
VERSION_php ?= 8.1
54
45
CONTAINER_php ?= php:$(VERSION_php ) -cli
55
46
CONFIGURE_php ?= php
56
47
INSTALL_php ?= php-install
57
- COPY_php = RUN ldconfig
48
+ RUN_php ? = ldconfig
58
49
59
50
VERSION_python ?= 3.11
60
51
CONTAINER_python ?= python:$(VERSION_python )
61
52
CONFIGURE_python ?= python --config=/usr/local/bin/python3-config
62
53
INSTALL_python ?= python3-install
63
- COPY_python =
54
+ RUN_python ?= /bin/true
64
55
65
56
VERSION_ruby ?= 3.1
66
57
CONTAINER_ruby ?= ruby:$(VERSION_ruby )
67
58
CONFIGURE_ruby ?= ruby
68
59
INSTALL_ruby ?= ruby-install
69
- COPY_ruby = RUN gem install rack
60
+ RUN_ruby ? = gem install rack
70
61
71
62
default :
72
63
@echo " valid targets: all build dockerfiles clean"
@@ -78,14 +69,14 @@ modname = $(shell echo $1 | /usr/bin/tr -d '.01234567890-')
78
69
dockerfiles : $(addprefix Dockerfile., $(MODVERSIONS ) )
79
70
build : $(addprefix build-,$(MODVERSIONS ) )
80
71
81
- Dockerfile.% : ../../version
72
+ Dockerfile.% : ../../version template.Dockerfile
82
73
@echo " ===> Building $@ "
83
74
cat template.Dockerfile | sed \
84
75
-e ' s,@@VERSION@@,$(VERSION),g' \
85
76
-e ' s,@@CONTAINER@@,$(CONTAINER_$(call modname, $*)),g' \
86
77
-e ' s,@@CONFIGURE@@,$(CONFIGURE_$(call modname, $*)),g' \
87
78
-e ' s,@@INSTALL@@,$(INSTALL_$(call modname, $*)),g' \
88
- -e ' s,@@COPY @@,$(COPY_ $(call modname, $*)),g' \
79
+ -e ' s,@@RUN @@,$(RUN_ $(call modname, $*)),g' \
89
80
> $@
90
81
91
82
build-% : Dockerfile.%
0 commit comments