Skip to content
Snippets Groups Projects
Commit 3bf8e2c3 authored by Hugo Trentesaux's avatar Hugo Trentesaux
Browse files

wip dockerfile

parent 6863711c
Branches
No related tags found
No related merge requests found
# global node image
FROM node:20-alpine AS base
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
RUN corepack enable
COPY . /app
WORKDIR /app
# build deps
FROM base as deps
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile
# datapod image
FROM base
COPY --from=deps /app/node_modules /app/node_modules
CMD ["npx", "tsx", "src/scripts/hello.ts"]
# TODO build image only for indexer without app
# TODO really build for node and not use tsx (is it necessary)
# build and run for test
# docker buildx build . -t test-datapod
# docker run --rm -it test-datapod
console.log('Hello World!')
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment