-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
32 lines (22 loc) · 888 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
# get baseimage
FROM ubuntu:latest
RUN apt-get update -y
RUN apt-get upgrade -y
RUN apt-get install --reinstall ca-certificates -y
# install developer dependencies
RUN apt-get install -y git build-essential gcc g++ make cmake git pkg-config wget --no-install-recommends
# # install cmake
# RUN wget https://github.com/Kitware/CMake/releases/download/v3.24.2/cmake-3.24.2.tar.gz
# RUN tar -xvf cmake-3.24.2.tar.gz
# RUN cd cmake-3.24.2 && ./bootstrap && make -j4 && make install
# install vcpkg package manager
RUN git clone https://github.com/microsoft/vcpkg
RUN apt-get install -y curl zip
RUN vcpkg/bootstrap-vcpkg.sh
RUN /vcpkg/vcpkg install cppkafka
# copy files from local directory to container
COPY . /project
RUN mkdir /build
WORKDIR /build
RUN bash -c "cmake ../project -DCMAKE_TOOLCHAIN_FILE=/vcpkg/scripts/buildsystems/vcpkg.cmake && cmake --build ."
CMD ./${TARGET}