ocean-subgraph/Dockerfile

24 lines
609 B
Docker
Raw Permalink Normal View History

2023-08-15 14:00:25 +02:00
FROM ubuntu:20.04 as base
RUN apt-get update && apt-get -y install bash curl
RUN curl -sL https://deb.nodesource.com/setup_16.x -o /tmp/nodesource_setup.sh
RUN bash /tmp/nodesource_setup.sh
RUN apt install nodejs
FROM base as builder
RUN apt-get update && apt-get -y install wget
COPY package*.json /usr/src/app/
2023-08-15 14:00:25 +02:00
WORKDIR /usr/src/app/
ENV NODE_ENV=production
RUN npm ci
2023-08-15 14:00:25 +02:00
FROM base as runner
ENV NODE_ENV=production
COPY . /usr/src/app
2023-08-15 14:00:25 +02:00
WORKDIR /usr/src/app/
COPY --from=builder /usr/src/app/node_modules/ /usr/src/app/node_modules/
ENV DEPLOY_SUBGRAPH=true
ENTRYPOINT ["/usr/src/app/docker-entrypoint.sh"]