-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
30 lines (22 loc) · 781 Bytes
/
Dockerfile
File metadata and controls
30 lines (22 loc) · 781 Bytes
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
# Use the official Rust image as the base image
FROM rust:latest as builder
# Set the working directory
WORKDIR /usr/src/ators
# Copy
COPY Cargo.toml Cargo.lock ./
COPY ators/Cargo.toml ./ators/
COPY ators/src ./ators/src
COPY atorsl/Cargo.toml ./atorsl/
COPY atorsl/build.rs ./atorsl
COPY atorsl/src ./atorsl/src
COPY fixtures/rollbar ./
# Build the application
RUN cargo build --release
# Create a new lightweight image for running the application
FROM debian:stable-slim
RUN apt-get update && apt-get install -y libssl-dev && rm -rf /var/lib/apt/lists/*
# Copy the binary from the builder
COPY --from=builder /usr/src/ators/target/release/ators /usr/local/bin
COPY --from=builder /usr/src/ators/rollbar /usr/src
# Set the entrypoint to run your app
ENTRYPOINT ["ators"]