-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
61 lines (51 loc) · 1.24 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
60
61
#FROM centos:latest as cpp_build_base
#
## Update the image with the latest packages (recommended)
#RUN yum -y update && yum clean all
#
## Update image
#RUN yum install -y gcc gcc-c++ make git cmake autoconf libtool libatomic pkg-config unzip curl wget which
#
## CMake update:
#RUN mkdir -p /tmp/cmake && \
# pushd /tmp/cmake && \
# wget 'https://cmake.org/files/v3.16/cmake-3.16.6-Linux-x86_64.sh' && \
# bash cmake-3.16.6-Linux-x86_64.sh --prefix=/usr/local --exclude-subdir && \
# popd && \
# rm -rf /tmp/cmake
#
### Intermediate Stage
#FROM cpp_build_base AS service_build
#
#ADD . /service
#
#WORKDIR /service/utility
#
#RUN chmod +x /service/utility/install-oatpp-modules.sh
#RUN ./install-oatpp-modules.sh
#
#WORKDIR /service/build
#
#RUN cmake ..
#RUN make
#
#### Final Stage
#FROM centos:latest
#
#WORKDIR /opt/ott_keylib
#RUN yum -y update && yum clean all
#RUN yum install -y libatomic
#
#COPY --from=service_build /service/build/salt_utxo_cpp-exe ./
#EXPOSE 7000 7000
#ENTRYPOINT ["./salt_utxo_cpp-exe"]
FROM lganzzzo/alpine-cmake:latest
RUN apk add postgresql-dev
ADD . /service
WORKDIR /service/utility
RUN ./install-oatpp-modules.sh
WORKDIR /service/build
RUN cmake ..
RUN make
EXPOSE 7000 7000
ENTRYPOINT ["./salt_utxo_cpp-exe"]