Skip to content

Commit 817a25d

Browse files
author
mike dupont
committed
starting docker
1 parent f695b26 commit 817a25d

File tree

2 files changed

+4470
-0
lines changed

2 files changed

+4470
-0
lines changed

Dockerfile

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
FROM node:20-slim AS base
2+
ENV PNPM_HOME="/pnpm"
3+
ENV PATH="$PNPM_HOME:$PATH"
4+
RUN corepack enable
5+
COPY . /app
6+
WORKDIR /app
7+
8+
FROM base AS prod-deps
9+
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --prod --frozen-lockfile
10+
11+
FROM base AS build
12+
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile
13+
RUN pnpm run build
14+
15+
FROM base
16+
COPY --from=prod-deps /app/node_modules /app/node_modules
17+
COPY --from=build /app/dist /app/dist
18+
EXPOSE 8000
19+
CMD [ "pnpm", "start" ]
20+
21+
22+
23+
# # Use an official Ubuntu image as a base
24+
# #FROM ubuntu:latest
25+
# FROM o1labs/mina-local-network:compatible-latest-devnet
26+
27+
# # Set the working directory to /app
28+
# WORKDIR /app
29+
30+
# # Install required dependencies
31+
# RUN apt update && apt install -y \
32+
# git \
33+
# curl \
34+
# npm \
35+
# nodejs
36+
37+
# # Install Node.js version 18
38+
# RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash -
39+
# RUN apt-get install -y nodejs
40+
41+
# # Clone the repository and checkout the specific branch
42+
# RUN git clone https://github.com/meta-introspector/o1js.git .
43+
# RUN git checkout 7647eb9
44+
45+
# # Install npm dependencies
46+
# RUN npm ci
47+
48+
# # Build o1js
49+
# RUN npm run build
50+
51+
# # Expose the port for the web server
52+
# EXPOSE 8080
53+
54+
# # Run the command to start the web server when the container launches
55+
# CMD ["npm", "run", "start"]

0 commit comments

Comments
 (0)