-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
78 lines (60 loc) · 1.78 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
FROM ubuntu:18.04
# Install some basics
RUN apt-get update \
&& apt-get install -y \
wget \
curl \
git \
vim \
unzip \
xz-utils \
software-properties-common \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
# Add latest cmake/boost
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc | apt-key add - \
&& apt-add-repository 'deb https://apt.kitware.com/ubuntu/ bionic main' \
&& apt-add-repository -y ppa:mhier/libboost-latest
# Install required packages for dev
RUN apt-get update \
&& apt-get install -y \
build-essential \
libtool autoconf pkg-config \
ninja-build \
ruby-full \
clang-10 \
llvm-10 \
libc++-dev libc++abi-dev \
cmake \
libboost1.74-dev \
ccache \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
ENV CC=/usr/bin/clang-10
ENV CXX=/usr/bin/clang++-10
# ↑ Setup build environment
# ↓ Build and compile wallet core
RUN mkdir wallet-core
RUN git clone https://github.com/ShowBaba/wallet-core.git wallet-core
WORKDIR /wallet-core
## RUN git clone https://github.com/ShowBaba/wallet-api.git
COPY . /wallet-core/wallet-api
RUN mv /wallet-core/wallet-api/go-config.sh /wallet-core
RUN ls
RUN chmod +x ./go-config.sh
RUN ./go-config.sh
RUN ls
ENV PATH=$PATH:/wallet-core/go/bin
# RUN echo $PATH
# Install dependencies
RUN tools/install-dependencies
# Build: generate, cmake, and make
RUN tools/generate-files \
&& cmake -H. -Bbuild -DCMAKE_BUILD_TYPE=Debug \
&& make -Cbuild -j12
RUN cd wallet-api && go mod download && go build main.go
EXPOSE 8080
# ENV PORT=8080
# RUN ls
# RUN go env
ENTRYPOINT ["/wallet-core/wallet-api/main"]
#CMD ["/bin/bash"]