Skip to content

Commit fbf5123

Browse files
author
mike dupont
committed
now building
1 parent dc01b32 commit fbf5123

File tree

1 file changed

+2
-96
lines changed

1 file changed

+2
-96
lines changed

Dockerfile

+2-96
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,8 @@
1-
#18.20.4
2-
FROM node:18.20.4-slim AS base
1+
FROM node:20-slim AS base
32
ENV PNPM_HOME="/pnpm"
43
ENV PATH="$PNPM_HOME:$PATH"
54
RUN corepack enable
65

7-
#FROM ocaml/opam:ubuntu-22.04-ocaml-4.14@sha256:73f7c5dd28f7b757de325d915562a3f89903a64e763c0e334914fb56e082f5cb as build
8-
RUN apt-get update
9-
RUN apt-get install -y opam
10-
11-
USER root
12-
RUN apt-get update && apt-get install -y --no-install-recommends bubblewrap
13-
RUN opam init --disable-sandboxing --yes
14-
RUN opam exec -- opam update
15-
RUN opam exec -- opam install dune
16-
#RUN opam exec -- opam install --deps-only --with-test -y .
17-
#RUN sudo chown -R opam .
18-
#RUN opam exec -- dune build && opam exec -- dune test
19-
20-
216
WORKDIR /app
227

238
ADD pnpm-lock.yaml pnpm-lock.yaml
@@ -35,64 +20,15 @@ RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --prod --frozen-l
3520

3621
FROM base AS build
3722
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile
38-
#RUN npm run build
39-
RUN opam install -y js_of_ocaml-ppx
40-
RUN apt install -y libjemalloc-dev
41-
42-
## rust
43-
44-
# install toolchain
45-
RUN apt-get install --no-install-recommends -y musl-tools
46-
#RUN curl https://sh.rustup.rs -sSf | bash -x -s -- --default-toolchain stable -y
47-
# Get Rust
48-
RUN apt install -y git curl
49-
50-
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y --verbose
51-
RUN echo 'source $HOME/.cargo/env' >> $HOME/.bashrc
52-
ENV PATH=/root/.cargo/bin:$PATH
53-
# musl tools
54-
55-
# install musl target
56-
#RUN /root/.cargo/bin/rustup target add x86_64-unknown-linux-musl --toolchain stable-x86_64-unknown-linux-gnu
57-
# nightly-2023-09-01-x86_64-unknown-linux-gnu
58-
59-
# make default target to musl
60-
#RUN mkdir /.cargo && \
61-
# echo "[build]\ntarget = \"x86_64-unknown-linux-musl\"" > /.cargo/config
62-
RUN rustup toolchain install nightly-2023-09-01-x86_64-unknown-linux-gnu
63-
RUN rustup component add rust-src --toolchain nightly-2023-09-01-x86_64-unknown-linux-gnu
6423

6524
## now the source copyied
6625
COPY src /app/src
6726
COPY tests /app/tests
6827
COPY benchmark /app/benchmark
6928
COPY jest /app/jest
70-
71-
#RUN rustup toolchain install nightly
72-
73-
7429
COPY dune-project /app/dune-project
75-
# nightly-2023-09-01-x86_64-unknown-linux-gnu
76-
RUN cargo install wasm-pack
77-
RUN opam install -y bin_prot
78-
RUN opam install -y async
79-
RUN opam install -y Core_kernel
80-
RUN opam install -y re2
81-
RUN opam install -y ctypes
82-
RUN opam install -y digestif
83-
#RUN opam install -y hash_prefix_create
84-
#RUN opam install -y logger.fake
85-
RUN opam install -y promise
86-
#RUN opam install -y promise.js_helpers
87-
RUN opam install -y zarith_stubs_js
88-
#RUN opam install -y tuple_lib
89-
#RUN opam install -y unsigned_extended
90-
#RUN opam install -y with_hash
91-
#RUN opam install -y bindings_js
92-
RUN opam install -y integers_stubs_js
9330

94-
95-
RUN opam exec -- pnpm run build:bindings
31+
RUN npm ci
9632
RUN pnpm run build
9733

9834
FROM base
@@ -101,33 +37,3 @@ COPY --from=build /app/dist /app/dist
10137
EXPOSE 8000
10238
CMD [ "pnpm", "start" ]
10339

104-
105-
106-
# # Use an official Ubuntu image as a base
107-
# #FROM ubuntu:latest
108-
# FROM o1labs/mina-local-network:compatible-latest-devnet
109-
110-
# # Set the working directory to /app
111-
# WORKDIR /app
112-
113-
# # Install required dependencies
114-
115-
# # Install Node.js version 18
116-
# RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash -
117-
# RUN apt-get install -y nodejs
118-
119-
# # Clone the repository and checkout the specific branch
120-
# RUN git clone https://github.com/meta-introspector/o1js.git .
121-
# RUN git checkout 7647eb9
122-
123-
# # Install npm dependencies
124-
# RUN npm ci
125-
126-
# # Build o1js
127-
# RUN npm run build
128-
129-
# # Expose the port for the web server
130-
# EXPOSE 8080
131-
132-
# # Run the command to start the web server when the container launches
133-
# CMD ["npm", "run", "start"]

0 commit comments

Comments
 (0)