forked from tremor-rs/tremor-runtime
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.native
58 lines (45 loc) · 1.37 KB
/
Dockerfile.native
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
FROM rust:latest as builder
# Avoid warnings by switching to noninteractive
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install -y libclang-dev cmake \
#
# Clean up
&& apt-get autoremove -y \
&& apt-get clean -y \
&& rm -rf /var/lib/apt/lists/*
# Switch back to dialog for any ad-hoc use of apt-get
ENV DEBIAN_FRONTEND=dialog
COPY Cargo.* ./
# needed to build as cpu-target=native (intent of this dockerfile)
COPY .cargo ./.cargo
# Main library
COPY src ./src
# supporting libraries
COPY tremor-pipeline ./tremor-pipeline
COPY tremor-script ./tremor-script
COPY tremor-api ./tremor-api
COPY tremor-influx ./tremor-influx
# Binaries
COPY tremor-query ./tremor-query
COPY tremor-server ./tremor-server
COPY tremor-tool ./tremor-tool
RUN cargo build --release --all
FROM debian:buster-slim
RUN apt-get update \
&& apt-get install -y libssl1.1 libcurl4 libatomic1 \
#
# Clean up
&& apt-get autoremove -y \
&& apt-get clean -y \
&& rm -rf /var/lib/apt/lists/*
COPY --from=builder target/release/tremor-server /tremor-server
COPY --from=builder target/release/tremor-tool /tremor-tool
# Entrypoint
COPY docker/entrypoint.sh /entrypoint.sh
# configuration file
RUN mkdir /etc/tremor
COPY docker/config /etc/tremor/config
# logger configuration
COPY docker/logger.yaml /etc/tremor/logger.yaml
ENTRYPOINT ["/entrypoint.sh"]