forked from TWS/kalkutago
18 lines
480 B
Docker
18 lines
480 B
Docker
|
FROM rustlang/rust:nightly-bullseye-slim
|
||
|
RUN apt-get update &&\
|
||
|
apt-get install -yq sqlite3 &&\
|
||
|
apt-get clean &&\
|
||
|
rm -rf /var/lib/apt/lists
|
||
|
WORKDIR /src
|
||
|
ADD Cargo.toml Cargo.lock /src/
|
||
|
RUN echo "fn main() {}" > dummy.rs &&\
|
||
|
sed -i "s:src/main.rs:dummy.rs:" Cargo.toml
|
||
|
RUN cargo build --release
|
||
|
ADD src/ src/
|
||
|
RUN rm dummy.rs &&\
|
||
|
sed -i "s:dummy.rs:src/main.rs:" Cargo.toml
|
||
|
RUN cargo build --release
|
||
|
# ADD public/ public/
|
||
|
CMD ["target/release/kalkulog-server"]
|
||
|
|