-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
38 lines (30 loc) · 891 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# Use ubuntu 20.04 as OS
FROM ubuntu:20.04
# Avoid prompts during package installation
ENV DEBIAN_FRONTEND=noninteractive
# Update and install necessary packages
RUN apt-get update && apt-get install -y \
build-essential \
cmake \
curl \
git \
libssl-dev \
libsystemd-dev \
libmsgpack-dev \
libasio-dev \
libboost-all-dev
# Copy the source code into the image
COPY . /myapp
# Build the project
WORKDIR /myapp
RUN rm -rf build && mkdir build && cd build && cmake ..
# Build the third-party json library
WORKDIR /myapp/third_party/json
RUN rm -rf build && mkdir build && cd build && cmake .. && make -j4 && make install
# Build the project
WORKDIR /myapp/build
RUN make -j 4
# # NOTE: this is only used in final test environment
# COPY ./build/bin/simcache-server /myapp/simcache-server
# # ENTRYPOINT
ENTRYPOINT ["/myapp/build/bin/simcache-server"]