lasthourcloud/Dockerfile

34 lines
1.3 KiB
Docker
Raw Normal View History

2022-04-01 12:25:55 +00:00
FROM node:16.14.2-alpine as install
2022-02-10 14:47:44 +00:00
WORKDIR /app
COPY package*.json .
RUN yarn install
2022-04-01 12:25:55 +00:00
FROM node:16.14.2-alpine
2022-03-31 22:08:29 +00:00
ARG TARGETPLATFORM
2022-04-01 12:25:55 +00:00
WORKDIR /app
ENV PRISMA_QUERY_ENGINE_BINARY=/app/prisma-engines/query-engine \
PRISMA_MIGRATION_ENGINE_BINARY=/app/prisma-engines/migration-engine \
PRISMA_INTROSPECTION_ENGINE_BINARY=/app/prisma-engines/introspection-engine \
PRISMA_FMT_BINARY=/app/prisma-engines/prisma-fmt \
PRISMA_CLI_QUERY_ENGINE_TYPE=binary \
PRISMA_CLIENT_ENGINE_TYPE=binary
2022-04-01 15:16:11 +00:00
2022-04-01 15:46:08 +00:00
COPY --from=coollabsio/prisma-engine:latest /prisma-engines/query-engine /prisma-engines/migration-engine /prisma-engines/introspection-engine /prisma-engines/prisma-fmt /app/prisma-engines/
2022-04-01 12:25:55 +00:00
COPY --from=install /app/node_modules ./node_modules
COPY . .
2022-04-11 18:29:29 +00:00
RUN apk add --no-cache git git-lfs openssh-client curl jq cmake sqlite openssl
2022-02-10 14:47:44 +00:00
RUN curl -f https://get.pnpm.io/v6.16.js | node - add --global pnpm@6
RUN pnpm add -g pnpm
RUN mkdir -p ~/.docker/cli-plugins/
2022-04-01 12:25:55 +00:00
RUN curl -SL https://cdn.coollabs.io/bin/$TARGETPLATFORM/docker-20.10.9 -o /usr/bin/docker
RUN curl -SL https://cdn.coollabs.io/bin/$TARGETPLATFORM/docker-compose-linux-2.3.4 -o ~/.docker/cli-plugins/docker-compose
2022-03-31 22:08:29 +00:00
RUN chmod +x ~/.docker/cli-plugins/docker-compose /usr/bin/docker
2022-02-10 14:47:44 +00:00
2022-04-01 12:25:55 +00:00
RUN pnpm build
2022-02-10 14:47:44 +00:00
EXPOSE 3000
CMD ["pnpm", "start"]