-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile-demo
49 lines (37 loc) · 1.23 KB
/
Dockerfile-demo
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
# Use a more recent Rust version
FROM rust:1.74.0
# Install system dependencies
RUN apt-get update && apt-get install -y \
sqlite3 \
libsqlite3-dev \
wget \
&& rm -rf /var/lib/apt/lists/*
# Set the working directory
WORKDIR /app
# Copy the entire repository
COPY . .
# Install diesel_cli with specific version
RUN cargo install [email protected] --no-default-features --features sqlite --locked
# Run migrations
RUN diesel migration run
# Build the application in release mode
RUN cargo build --release
# Install ipfs (for fetch-params.sh)
RUN wget https://dist.ipfs.io/go-ipfs/v0.9.1/go-ipfs_v0.9.1_linux-amd64.tar.gz && \
tar -xvzf go-ipfs_v0.9.1_linux-amd64.tar.gz && \
cd go-ipfs && \
bash install.sh && \
cd .. && \
rm -rf go-ipfs go-ipfs_v0.9.1_linux-amd64.tar.gz
# Make fetch-params.sh executable
RUN chmod +x fetch-params.sh
# Run fetch-params.sh
RUN ./fetch-params.sh
# Create necessary directories
RUN mkdir -p /root/.local/share/ZcashParams
# Set default environment variables
ENV ZCASH_NODE_ADDRESS=127.0.0.1
ENV ZCASH_NODE_PORT=18232
ENV ZCASH_NODE_PROTOCOL=http
# Set the entrypoint
ENTRYPOINT ["cargo", "run", "--release", "--package", "zcash_tx_tool", "--bin", "zcash_tx_tool", "test-orchard-zsa"]