transicion-desordenada-diablo/downloader/Containerfile

20 lines
957 B
Text
Raw Normal View History

FROM docker.io/alpine:3.18 as build
2023-11-29 00:38:59 +00:00
RUN apk add --no-cache npm
RUN npm install -g esbuild pnpm
COPY .. /tmp/build/
WORKDIR /tmp/build/downloader
RUN pnpm install
RUN esbuild --bundle --format=cjs --platform=node --outfile=download_json.build.js --sourcemap=inline download_json.js
RUN esbuild --bundle --format=cjs --platform=node --outfile=generate_dump_metadata.build.js --sourcemap=inline generate_dump_metadata.js
FROM docker.io/alpine:3.18
RUN apk add --no-cache nodejs-current tini
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
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"]