-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
43 lines (31 loc) · 960 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
33
34
35
36
37
38
39
40
41
42
43
FROM alpine:latest AS builder
RUN apk update && apk add gcc g++ cmake automake autoconf libtool make linux-headers git
WORKDIR /build
RUN git clone --depth=1 https://github.com/fumiama/simple-crypto.git \
&& cd simple-crypto \
&& mkdir build \
&& cd build \
&& cmake .. \
&& make install
RUN rm -rf *
RUN git clone --depth=1 https://github.com/fumiama/simple-protobuf.git \
&& cd simple-protobuf \
&& mkdir build \
&& cd build \
&& cmake .. \
&& make install
RUN rm -rf *
COPY ./*.c .
COPY ./*.h .
COPY ./CMakeLists.txt .
RUN mkdir build \
&& cd build \
&& cmake .. \
&& make
FROM alpine:latest
COPY --from=builder /build/build/simple-dict-server /usr/bin/simple-dict-server
COPY --from=builder /usr/local/lib/libspb.so /usr/local/lib/libspb.so
COPY --from=builder /usr/local/lib/libscrypto.so /usr/local/lib/libscrypto.so
RUN chmod +x /usr/bin/simple-dict-server
WORKDIR /data
ENTRYPOINT [ "/usr/bin/simple-dict-server" ]