RUN apt-get update && apt-get install -y libuv1 libuv1-dev
# Cassandra driver C++ dependency
WORKDIR /dependencies
RUN curl -o cassandra-cpp-driver.deb https://downloads.datastax.com/cpp-driver/ubuntu/18.04/cassandra/v2.16.0/cassandra-cpp-driver_2.16.0-1_amd64.deb
RUN curl -o cassandra-cpp-driver-dev.deb https://downloads.datastax.com/cpp-driver/ubuntu/18.04/cassandra/v2.16.0/cassandra-cpp-driver-dev_2.16.0-1_amd64.deb
RUN dpkg --ignore-depends=multiarch-support -i cassandra-cpp-driver.deb && rm cassandra-cpp-driver.deb
RUN dpkg --ignore-depends=multiarch-support -i cassandra-cpp-driver-dev.deb && rm cassandra-cpp-driver-dev.deb
WORKDIR /backend
# Cache the super slow updating crates.io index step
COPY ../backend/Cargo.toml .
COPY ../backend/Cargo.lock .
RUN mkdir ./src &&echo'fn main() { println!("I am the cache-carrot"); }' > ./src/main.rs