-
Notifications
You must be signed in to change notification settings - Fork 12
/
Dockerfile.no-systemd
68 lines (54 loc) · 1.81 KB
/
Dockerfile.no-systemd
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
FROM ghcr.io/balena-io-modules/confd-releases:0.0.6-confd-v0-16-0 AS confd
FROM debian:bookworm AS runtime
ENV DEBIAN_FRONTEND noninteractive∂
ENV TERM xterm
COPY src/01_nodoc /etc/dpkg/dpkg.cfg.d/
COPY src/01_buildconfig /etc/apt/apt.conf.d/
# Install ops/sre related packages.
# hadolint ignore=DL3008
RUN apt-get update && apt-get install -y --no-install-recommends \
avahi-daemon \
ca-certificates \
curl \
htop \
ifupdown \
jq \
nano \
net-tools \
procmail \
strace \
vim \
wget \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# And configure them.
COPY src/htoprc /root/.config/htop/
COPY src/mdns.allow /etc/mdns.allow
# === Confd part ===
# May be removed once we switch to a different configuration mechanism.
# Directory where rendered environment files are store.
RUN mkdir /balena
# Set an entry point that runs confd if necessary before executing the main process.
ENTRYPOINT ["/usr/bin/confd-entry.sh"]
COPY src/confd-entry.sh /usr/bin/confd-entry.sh
# balenaMachine automatic configuration script.
COPY src/configure-balena.sh /usr/bin/configure-balena.sh
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
ARG TARGETARCH
# renovate: datasource=node-version depName=node
ARG NODE_VERSION=22.12.0
# renovate: datasource=npm depName=npm
ARG NPM_VERSION=10.9.2
RUN if [ "${TARGETARCH}" = "amd64" ] ; \
then \
NODE_URL="https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-x64.tar.gz" ; \
else \
NODE_URL="https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-${TARGETARCH}.tar.gz" ; \
fi && \
curl -fsSL "${NODE_URL}" | tar xz -C /usr/local --strip-components=1 --no-same-owner \
&& npm install -g npm@"$NPM_VERSION" \
&& rm -rf /root/.npm/_cacache \
&& npm cache clear --force \
&& rm -rf /tmp/*
# Confd binary installation.
COPY --from=confd /confd /usr/local/bin/confd