-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
55 lines (41 loc) · 1.46 KB
/
Dockerfile
File metadata and controls
55 lines (41 loc) · 1.46 KB
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# Start with the base Ubuntu image
FROM ubuntu:22.04
# Set the timezone
ENV TZ=UTC
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
# Install necessary dependencies
RUN apt-get update -yqq \
&& apt-get install -yqq --no-install-recommends \
software-properties-common \
sudo curl wget cmake make pkg-config locales git \
gcc-11 g++-11 openssl libssl-dev libjsoncpp-dev uuid-dev \
zlib1g-dev libc-ares-dev postgresql-server-dev-all \
libmariadb-dev libsqlite3-dev libhiredis-dev \
&& rm -rf /var/lib/apt/lists/* \
&& locale-gen en_US.UTF-8
# Set environment variables for localization
ENV LANG=en_US.UTF-8 \
LANGUAGE=en_US:en \
LC_ALL=en_US.UTF-8 \
CC=gcc-11 \
CXX=g++-11 \
AR=gcc-ar-11 \
RANLIB=gcc-ranlib-11 \
IROOT=/install
# Clone Drogon repository
ENV DROGON_ROOT="$IROOT/drogon"
RUN git clone https://github.com/drogonframework/drogon $DROGON_ROOT
# Set the working directory to Drogon repository
WORKDIR $DROGON_ROOT
# Build Drogon
RUN ./build.sh
# Copy source code for your application (from the local directory)
COPY . /app
# Install build tools for the app
RUN apt-get update && apt-get install -y cmake g++ git
RUN ls -l /app && ls -l /app/build || true
RUN git submodule update --init --recursive
# Create build directory and build the project
RUN mkdir -p /app/build && cd /app/build && cmake .. && make -j$(nproc) VERBOSE=1
# Set CMD to the actual binary
CMD ["./org_chart"]