Skip to content

Commit

Permalink
starting docker
Browse files Browse the repository at this point in the history
  • Loading branch information
mike dupont committed Sep 14, 2024
1 parent 7647eb9 commit deeb075
Show file tree
Hide file tree
Showing 2 changed files with 4,470 additions and 0 deletions.
55 changes: 55 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
FROM node:20-slim AS base
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
RUN corepack enable
COPY . /app
WORKDIR /app

FROM base AS prod-deps
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --prod --frozen-lockfile

FROM base AS build
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile
RUN pnpm run build

FROM base
COPY --from=prod-deps /app/node_modules /app/node_modules
COPY --from=build /app/dist /app/dist
EXPOSE 8000
CMD [ "pnpm", "start" ]



# # Use an official Ubuntu image as a base
# #FROM ubuntu:latest
# FROM o1labs/mina-local-network:compatible-latest-devnet

# # Set the working directory to /app
# WORKDIR /app

# # Install required dependencies
# RUN apt update && apt install -y \
# git \
# curl \
# npm \
# nodejs

# # Install Node.js version 18
# RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash -
# RUN apt-get install -y nodejs

# # Clone the repository and checkout the specific branch
# RUN git clone https://github.com/meta-introspector/o1js.git .
# RUN git checkout 7647eb9

# # Install npm dependencies
# RUN npm ci

# # Build o1js
# RUN npm run build

# # Expose the port for the web server
# EXPOSE 8080

# # Run the command to start the web server when the container launches
# CMD ["npm", "run", "start"]
Loading

0 comments on commit deeb075

Please sign in to comment.