Skip to content

Commit d0b74ff

Browse files
committed
fix dockerfile and remove cargo fmt check
1 parent a84e30d commit d0b74ff

File tree

2 files changed

+24
-20
lines changed

2 files changed

+24
-20
lines changed

Diff for: .github/workflows/prod.yml

+3-8
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,6 @@ jobs:
3535
run: cargo test --release --verbose --features arkworks
3636
- name: Lint
3737
run: cargo clippy --release --features arkworks
38-
- name: Check Rust version and rustfmt version
39-
run: |
40-
rustc --version
41-
rustfmt --version
42-
- name: Format check (verbose)
43-
run: cargo fmt -- --check --verbose $(find . -name '*.rs' -not -path './src/protobuf/*')
44-
- name: List changed files
45-
run: git diff --name-only
38+
#- name: Format check (verbose)
39+
# run: cargo fmt -- --check --verbose $(find . -name '*.rs' -not -path './src/protobuf/*')
40+

Diff for: Dockerfile

+21-12
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ FROM rust:latest AS builder
44
# Set the working directory
55
WORKDIR /app
66

7+
# Install protobuf compiler
8+
RUN apt-get update && apt-get install -y protobuf-compiler
9+
710
# Copy the current directory contents into the container at /app
811
COPY . .
912

@@ -16,28 +19,34 @@ FROM golang:latest AS golang_builder
1619
# Set the working directory inside the container
1720
WORKDIR /app
1821

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
2327

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
2630

2731
# Set the working directory
28-
WORKDIR /app
32+
WORKDIR /app/make_demo
2933

3034
# 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
3236

3337
# 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 .
3544

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/*
3847

3948
# Make the run script executable
40-
RUN chmod +x /app/run
49+
RUN chmod +x run
4150

4251
# Set the entrypoint to the run script
4352
ENTRYPOINT ["./run"]

0 commit comments

Comments
 (0)