-
Notifications
You must be signed in to change notification settings - Fork 80
/
arm64v8.Dockerfile
43 lines (31 loc) · 1.22 KB
/
arm64v8.Dockerfile
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
FROM node:18-slim as builder
ARG STANDALONE
RUN mkdir /opt/local && apt-get update && \
apt-get install -y --no-install-recommends git qemu-user-static qemu-user binfmt-support wget ca-certificates
RUN wget -qO /usr/bin/tini "https://github.com/krallin/tini/releases/download/v0.19.0/tini-arm64" \
&& echo "07952557df20bfd2a95f9bef198b445e006171969499a1d361bd9e6f8e5e0e81 /usr/bin/tini" | sha256sum -c - \
&& chmod +x /usr/bin/tini
WORKDIR /opt/charged
COPY package.json npm-shrinkwrap.json ./
RUN npm install
COPY . .
RUN npm run dist \
&& rm -rf src
FROM arm64v8/node:18-slim
WORKDIR /opt/charged
ARG TESTRUNNER
ENV HOME /tmp
ENV NODE_ENV production
ARG STANDALONE
ENV STANDALONE=$STANDALONE
COPY --from=builder /usr/bin/qemu-aarch64-static /usr/bin/qemu-aarch64-static
RUN apt-get update && apt-get install -y --no-install-recommends inotify-tools \
&& rm -rf /var/lib/apt/lists/* \
&& ln -s /opt/charged/bin/charged /usr/bin/charged \
&& mkdir /data \
&& ln -s /data/lightning /tmp/.lightning
COPY --from=builder /opt/local /usr/local
COPY --from=builder /opt/charged /opt/charged
COPY --from=builder /usr/bin/tini /usr/bin/
ENTRYPOINT [ "tini", "-g", "--", "bin/docker-entrypoint.sh" ]
EXPOSE 9112 9735