-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
38 lines (29 loc) · 840 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
# syntax=docker/dockerfile:1
FROM rust:latest AS builder
WORKDIR /app
RUN apt-get update && apt-get install -y \
pkg-config \
cmake \
libclang-dev \
libfftw3-dev \
libavutil-dev \
libavformat-dev \
libswresample-dev \
libavcodec-dev
# Copy dependency files, then fetch dependencies.
# This layer will only be rebuilt when we modify dependencies.
COPY needle/Cargo.toml needle/Cargo.lock /app/needle/
RUN cargo fetch --manifest-path needle/Cargo.toml
# Copy the code and build the binary.
COPY . .
RUN cargo install --path needle/
FROM debian:bullseye-slim
RUN apt-get update && apt-get install -y \
libfftw3-3 \
libavutil56 \
libavformat58 \
libswresample3 \
libavcodec58
COPY --from=builder /usr/local/cargo/bin/needle /usr/local/bin/needle
ENTRYPOINT ["needle"]
CMD ["--help"]