2023-11-28 22:34:31 +00:00
|
|
|
|
2023-11-28 21:22:25 +00:00
|
|
|
FROM docker.io/alpine:3.18 as build
|
|
|
|
RUN apk add --no-cache npm esbuild
|
2023-11-28 22:19:35 +00:00
|
|
|
RUN npm install -g esbuild
|
2023-11-28 22:34:31 +00:00
|
|
|
WORKDIR /tmp/build
|
|
|
|
|
|
|
|
COPY package.json .
|
|
|
|
RUN npm install
|
|
|
|
|
|
|
|
COPY download_json.js .
|
|
|
|
RUN esbuild --bundle --format=cjs --platform=node --outfile=build.js download_json.js
|
2023-11-28 21:22:25 +00:00
|
|
|
|
|
|
|
FROM docker.io/alpine:3.18
|
|
|
|
RUN apk add --no-cache nodejs-current tini
|
|
|
|
COPY pki/ca_intermediate_root_bundle.pem /usr/lib/ca_intermediate_root_bundle.pem
|
|
|
|
COPY --from=build /tmp/build/build.js /usr/local/bin/download_json.js
|
|
|
|
ENV NODE_EXTRA_CA_CERTS=/usr/lib/ca_intermediate_root_bundle.pem
|
|
|
|
WORKDIR /data
|
2023-11-28 23:46:14 +00:00
|
|
|
CMD ["/sbin/tini", "node", "/usr/local/bin/download_json.js"]
|