-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathDockerfile
37 lines (28 loc) · 983 Bytes
/
Dockerfile
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
# Delta Dockerfile
# Description: Dockerfile for delta
# This is the multi-stage docker image to build and run delta
# Author: Outercore Engineering
# Name: delta
# Email:
# Url: https://delta.store
FROM golang:1.19 AS builder
RUN apt-get update && \
apt-get install -y wget jq hwloc ocl-icd-opencl-dev git libhwloc-dev pkg-config make && \
apt-get install -y cargo
WORKDIR /app/
ADD . /app
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"
RUN RUSTFLAGS="-C target-cpu=native -g" FFI_BUILD_FROM_SOURCE=1 FFI_USE_BLST_PORTABLE=1 make
FROM golang:1.19
ARG WALLET_DIR=""
ARG REPO="/root/config/.whypfs"
RUN echo "Building docker image for delta-dm"
RUN echo "WALLET_DIR: ${WALLET_DIR}"
RUN apt-get update && \
apt-get install -y hwloc libhwloc-dev ocl-icd-opencl-dev
WORKDIR /root/
COPY --from=builder /app/delta ./
COPY ${WALLET_DIR} /root/config/wallet
CMD ./delta daemon --repo=${REPO} --wallet-dir=${WALLET_DIR}
EXPOSE 1414