-
Notifications
You must be signed in to change notification settings - Fork 0
/
DockerFile.cassandra
31 lines (22 loc) · 1.1 KB
/
DockerFile.cassandra
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
FROM rust:1.67 AS base
USER root
RUN \
apt-get update \
&& apt-get install -y wget ca-certificates tzdata libpq-dev curl procps libuv1 libuv1-dev libssl-dev \
&& wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.0g-2ubuntu4_amd64.deb \
&& dpkg -i libssl1.1_1.1.0g-2ubuntu4_amd64.deb \
&& wget http://archive.ubuntu.com/ubuntu/pool/main/g/glibc/multiarch-support_2.27-3ubuntu1_amd64.deb \
&& dpkg -i multiarch-support_2.27-3ubuntu1_amd64.deb \
&& wget https://downloads.datastax.com/cpp-driver/ubuntu/18.04/cassandra/v2.15.3/cassandra-cpp-driver_2.15.3-1_amd64.deb \
&& wget https://downloads.datastax.com/cpp-driver/ubuntu/18.04/cassandra/v2.15.3/cassandra-cpp-driver-dev_2.15.3-1_amd64.deb \
&& dpkg -i cassandra-cpp-driver_2.15.3-1_amd64.deb cassandra-cpp-driver-dev_2.15.3-1_amd64.deb \
&& ln -s /usr/lib/x86_64-linux-gnu/libcassandra.so.2 /usr/lib/libcassandra.so
WORKDIR /app
COPY . .
RUN cargo build --feature cassandra
ARG BIN_DIR=/local/bin
ARG BINARY=store
RUN mkdir -p ${BIN_DIR}
RUN cp /app/target/debug/${BINARY} ${BIN_DIR}/${BINARY}
WORKDIR ${BIN_DIR}
CMD ./store