@@ -4,6 +4,9 @@ FROM rust:latest AS builder
4
4
# Set the working directory
5
5
WORKDIR /app
6
6
7
+ # Install protobuf compiler
8
+ RUN apt-get update && apt-get install -y protobuf-compiler
9
+
7
10
# Copy the current directory contents into the container at /app
8
11
COPY . .
9
12
@@ -16,28 +19,34 @@ FROM golang:latest AS golang_builder
16
19
# Set the working directory inside the container
17
20
WORKDIR /app
18
21
19
- # Download the golang binary
20
- RUN wget https://github.com/drand/drand/releases/download/v1.5.8-testnest/drand-v1.5.8-testnest-linux-amd64.tar.gz \
21
- && tar -xzf drand-v1.5.8-testnest-linux-amd64.tar.gz \
22
- && mv drand /app/make_demo/drand_go
22
+ # Download the golang binary (needed when we run from latest releases)
23
+ # RUN wget https://github.com/drand/drand/releases/download/v1.5.8/drand_1.5.8_linux_amd64.tar.gz && \
24
+ # tar -xzf drand_1.5.8_linux_amd64.tar.gz && \
25
+ # mkdir -p /app/make_demo && \
26
+ # mv drand /app/make_demo/drand_go
23
27
24
- # Use a minimal base image for the final stage
25
- FROM debian:bullseye-slim
28
+ # Use Ubuntu as the final base image
29
+ FROM ubuntu:22.04
26
30
27
31
# Set the working directory
28
- WORKDIR /app
32
+ WORKDIR /app/make_demo
29
33
30
34
# Copy the compiled Rust binary from the builder stage
31
- COPY --from=builder /app/target/release/drand-rs /app/make_demo/drand_rs
35
+ COPY --from=builder /app/target/release/drand /app/make_demo/drand_rs
32
36
33
37
# Copy the Golang binary from the golang_builder stage
34
- COPY --from=golang_builder /app/make_demo/drand_go /app/make_demo/drand_go
38
+ # COPY --from=golang_builder /app/make_demo/drand_go /app/make_demo/drand_go
39
+
40
+ # Copy only the necessary files from make_demo
41
+ COPY make_demo/drand_go .
42
+ COPY make_demo/stop .
43
+ COPY make_demo/run .
35
44
36
- # Copy the run script
37
- COPY run /app/run
45
+ # Install any necessary runtime dependencies
46
+ RUN apt-get update && apt-get install -y libssl-dev ca-certificates && rm -rf /var/lib/apt/lists/*
38
47
39
48
# Make the run script executable
40
- RUN chmod +x /app/ run
49
+ RUN chmod +x run
41
50
42
51
# Set the entrypoint to the run script
43
52
ENTRYPOINT ["./run" ]
0 commit comments