Skip to content

Commit

Permalink
update Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
WeiqiNs committed Oct 31, 2024
1 parent 23f9f0b commit 74833f4
Showing 1 changed file with 9 additions and 19 deletions.
28 changes: 9 additions & 19 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,30 +13,20 @@ RUN git clone https://github.com/relic-toolkit/relic.git
## Relic library installation.
RUN mkdir /relic/build
WORKDIR "/relic/build"
RUN ../preset/gmp-pbc-bls381.sh ../ && \
make && \
make install
RUN ../preset/gmp-pbc-bls381.sh .. && make && make install

# Copy the files over to working directory.
RUN mkdir -p /home/project/build
COPY . /home/project
RUN mkdir -p /home/LibRBP/build
COPY . /home/LibRBP

# Build the project.
WORKDIR "/home/project/build"
RUN cmake ..
RUN make

# Run all tests.
RUN ctest

# Install the project.
RUN make install
# Build the project, run tests and install.
WORKDIR "/home/LibRBP/build"
RUN cmake .. && make && ctest && make install

# Build the demo to make sure it works.
RUN mkdir -p /home/project/demo/build
WORKDIR "/home/project/demo/build"
RUN cmake ..
RUN make
RUN mkdir -p /home/LibRBP/demo/build
WORKDIR "/home/LibRBP/demo/build"
RUN cmake .. && make

# Run the demo and keep container running.
CMD ["/bin/sh", "-c", "./demo && tail -f /dev/null"]

0 comments on commit 74833f4

Please sign in to comment.