-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
42 lines (32 loc) · 1.39 KB
/
Dockerfile
File metadata and controls
42 lines (32 loc) · 1.39 KB
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
FROM alpine
ARG DOCKER_ADDITIONAL_TARGETS=help
ENV HOSTNAME=maked
ENV DOMAINNAME=home.arpa
ENV TERM=xterm
ENV EDITOR=nano
ENV DOCKER_ADDITIONAL_TARGETS=${DOCKER_ADDITIONAL_TARGETS}
# ARG BUILDKIT_CONTEXT_KEEP_GIT_DIR=1
# By convention, using /app to store container-specific files
WORKDIR /app
# Install the absolute mininum packages in Dockerfile
# Since packages may be install, keep a package index
RUN apk update && apk add make git nano curl
# install the Makefile "init" system
COPY Makefile /app/Makefile
COPY README.md /app/readme.md
COPY make.d/* /app/make.d/
COPY VERSION /VERSION
COPY .gitignore /app/.gitignore
# install a curated set of Alpine packages
# basically some "inetd" things, common
RUN make -d --warn-undefined-variables -f /app/make.d/__init.mk
# include any "extra packages", like "install-all", using make.d Makefile
RUN make -C /app -d -j 16 --warn-undefined-variables ${DOCKER_ADDITIONAL_TARGETS}
# todo: keeping 2nd RUN seperate to see in build to debug, but should be combined with && above
# IMPORTANT: CMD and ENTRYPOINT must use array syntax - otherwise args don't work
# make is entrypoint - see README.md for details on this approach
ENTRYPOINT ["make", "--debug=bjv", "--jobs=64", "--warn-undefined-variables"]
# note: the "-j 10" is the job limit for parallel jobs, by default its 2
# but as an "init" process
# cmd= is the <target>: in Makefile to run
CMD ["run"]