2023-11-28 22:34:31 +00:00
|
|
|
|
2023-11-28 21:22:25 +00:00
|
|
|
FROM docker.io/alpine:3.18 as build
|
2023-12-08 19:25:28 +00:00
|
|
|
RUN apk add --no-cache npm \
|
|
|
|
&& npm install -g esbuild pnpm
|
2023-11-28 22:34:31 +00:00
|
|
|
|
2023-12-09 16:12:57 +00:00
|
|
|
COPY . /tmp/build/
|
2023-12-08 19:05:25 +00:00
|
|
|
WORKDIR /tmp/build/downloader
|
2023-12-08 19:25:28 +00:00
|
|
|
RUN pnpm install \
|
|
|
|
&& esbuild --bundle --format=cjs --platform=node --outfile=download_json.build.js --sourcemap=inline download_json.js \
|
|
|
|
&& esbuild --bundle --format=cjs --platform=node --outfile=generate_dump_metadata.build.js --sourcemap=inline generate_dump_metadata.js
|
2023-11-28 21:22:25 +00:00
|
|
|
|
|
|
|
FROM docker.io/alpine:3.18
|
|
|
|
RUN apk add --no-cache nodejs-current tini
|
2023-12-08 19:05:25 +00:00
|
|
|
COPY downloader/pki/ca_intermediate_root_bundle.pem /usr/lib/ca_intermediate_root_bundle.pem
|
|
|
|
COPY --from=build /tmp/build/downloader/download_json.build.js /usr/local/bin/download_json.js
|
|
|
|
COPY --from=build /tmp/build/downloader/generate_dump_metadata.build.js /usr/local/bin/generate_dump_metadata.js
|
2023-11-28 21:22:25 +00:00
|
|
|
ENV NODE_EXTRA_CA_CERTS=/usr/lib/ca_intermediate_root_bundle.pem
|
|
|
|
WORKDIR /data
|
2023-11-28 23:53:41 +00:00
|
|
|
CMD ["/sbin/tini", "node", "--enable-source-maps", "/usr/local/bin/download_json.js"]
|