-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
59 lines (43 loc) · 1.22 KB
/
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
FROM ubuntu
# Set root user
USER root
# Set the working directory
WORKDIR /app
# Copy the current directory contents into the container at /app
COPY . /app
# Install tools
RUN apt-get update && apt-get install -y \
build-essential \
curl \
git \
wget \
g++ \
pkg-config \
linux-libc-dev
# Other tools
RUN apt-get install -y zip unzip tar
# -- Install vcpkg
# RUN cd / && \
# git clone https://github.com/Microsoft/vcpkg.git && \
# cd vcpkg && \
# chmod +x bootstrap-vcpkg.sh && \
# ./bootstrap-vcpkg.sh
VOLUME /vcpkg
ENV PATH="/vcpkg:${PATH}"
# Install CMake
RUN wget https://github.com/Kitware/CMake/releases/download/v3.26.3/cmake-3.26.3-linux-x86_64.sh && \
chmod +x *.sh && \
./cmake-3.26.3-linux-x86_64.sh --skip-license --prefix=/usr/local
ENV PATH="/usr/local/bin:${PATH}"
# Testing CMake
RUN cmake -version
# -- Install packages
# RUN vcpkg update && vcpkg install crow openssl boost boost-mysql mailio
# cd to working directory
RUN cd /app
# Export the port
EXPOSE 18080
# -- Build and run the app
# RUN mkdir build && cd build && cmake -DCMAKE_TOOLCHAIN_FILE="/vcpkg/scripts/buildsystems/vcpkg.cmake" .. && cmake --build . && chmod +x main && ./build/main
# Run the app
CMD ["/bin/bash"]