diff --git a/.dockerignore b/.dockerignore index d51b555617..7c23095e5d 100644 --- a/.dockerignore +++ b/.dockerignore @@ -26,6 +26,7 @@ prometheus.yml # Docker Dockerfile +Dockerfile.dev docker-compose.yml # Tests diff --git a/Dockerfile.dev b/Dockerfile.dev new file mode 100644 index 0000000000..56f32063ff --- /dev/null +++ b/Dockerfile.dev @@ -0,0 +1,19 @@ +# Dockerfile.dev is a stripped down version of Dockerfile that is used for development purposes. +# It minimizes number of installs and builds to speed up the development process. +# Run this on local host only. +# Generated image is larger than production image. Do not use this for production. + +FROM --platform=${BUILDPLATFORM:-amd64} node:22 AS build_dev +ARG COMMIT + +WORKDIR /usr/app + +COPY . . + +RUN yarn install --non-interactive && yarn build + +RUN cd packages/cli && GIT_COMMIT=${COMMIT} yarn write-git-data + +ENV NODE_OPTIONS=--max-old-space-size=8192 + +ENTRYPOINT ["node", "./packages/cli/bin/lodestar"]