This commit is contained in:
parent
9ffa37c686
commit
277fbae98f
@ -8,11 +8,11 @@ services:
|
||||
lotus:
|
||||
environment:
|
||||
- LOTUS_API_LISTENADDRESS=/ip4/0.0.0.0/tcp/1234/http
|
||||
image: cerc/lotus:local
|
||||
image: cerc/lotus-mainnet:local
|
||||
volumes:
|
||||
- parameters:/var/tmp/filecoin-proof-parameters
|
||||
- lotus-repo:/var/lib/lotus
|
||||
- lotus_shared:/root/.lotus-shared
|
||||
- lotus_shared:/root/.lotus
|
||||
- lotus_miner_data:/root/data
|
||||
ports:
|
||||
- "1234"
|
||||
@ -20,4 +20,4 @@ services:
|
||||
restart_policy:
|
||||
condition: on-failure
|
||||
delay: 30s
|
||||
command: ["lotus", "daemon"]
|
||||
entrypoint: ["sh", "/docker-lotus-entrypoint.sh"]
|
||||
|
@ -41,11 +41,11 @@ ENV FFI_BUILD_FROM_SOURCE=${FFI_BUILD_FROM_SOURCE}
|
||||
ARG RUSTFLAGS=""
|
||||
ARG GOFLAGS=""
|
||||
|
||||
RUN make deps && \
|
||||
make lotus lotus-gateway lotus-shed && \
|
||||
RUN make clean deps && \
|
||||
make lotus lotus-shed lotus-stats && \
|
||||
install -C ./lotus /usr/local/bin/lotus && \
|
||||
install -C ./lotus-gateway /usr/local/bin/lotus-gateway && \
|
||||
install -C ./lotus-shed /usr/local/bin/lotus-shed
|
||||
install -C ./lotus-shed /usr/local/bin/lotus-shed && \
|
||||
install -C ./lotus-stats /usr/local/bin/lotus-stats
|
||||
|
||||
#####################################
|
||||
FROM ubuntu:20.04 AS lotus-base
|
||||
@ -72,15 +72,9 @@ MAINTAINER Lotus Development Team
|
||||
|
||||
COPY --from=lotus-builder \
|
||||
/usr/local/bin/lotus \
|
||||
/usr/local/bin/lotus-gateway \
|
||||
/usr/local/bin/lotus-shed \
|
||||
/usr/local/bin/
|
||||
|
||||
#COPY scripts/docker-lotus-entrypoint.sh /
|
||||
#COPY myscripts/setup-node.sh /docker-entrypoint-scripts.d/setup-node.sh
|
||||
|
||||
ARG DOCKER_LOTUS_IMPORT_SNAPSHOT https://forest-archive.chainsafe.dev/latest/mainnet/
|
||||
ENV DOCKER_LOTUS_IMPORT_SNAPSHOT ${DOCKER_LOTUS_IMPORT_SNAPSHOT}
|
||||
ENV FILECOIN_PARAMETER_CACHE /var/tmp/filecoin-proof-parameters
|
||||
ENV LOTUS_PATH /var/lib/lotus
|
||||
ENV DOCKER_LOTUS_IMPORT_WALLET ""
|
||||
@ -95,7 +89,6 @@ USER fc
|
||||
|
||||
EXPOSE 1234
|
||||
|
||||
ENTRYPOINT ["/docker-lotus-entrypoint.sh"]
|
||||
|
||||
CMD ["-help"]
|
||||
|
||||
@ -111,8 +104,14 @@ ENV LOTUS_PATH /var/lib/lotus
|
||||
ENV LOTUS_WORKER_PATH /var/lib/lotus-worker
|
||||
ENV WALLET_PATH /var/lib/lotus-wallet
|
||||
|
||||
ARG DOCKER_LOTUS_IMPORT_SNAPSHOT=https://forest-archive.chainsafe.dev/latest/mainnet/
|
||||
ENV DOCKER_LOTUS_IMPORT_SNAPSHOT=${DOCKER_LOTUS_IMPORT_SNAPSHOT}
|
||||
|
||||
COPY --from=lotus-builder /opt/filecoin/lotus /usr/local/bin/
|
||||
COPY --from=lotus-builder /opt/filecoin/lotus-shed /usr/local/bin/
|
||||
COPY --from=lotus-builder /opt/filecoin/lotus-stats /usr/local/bin/
|
||||
COPY scripts/docker-lotus-entrypoint.sh /docker-lotus-entrypoint.sh
|
||||
RUN chmod +x /docker-lotus-entrypoint.sh
|
||||
|
||||
RUN mkdir /var/tmp/filecoin-proof-parameters
|
||||
RUN mkdir /var/lib/lotus
|
||||
@ -132,6 +131,8 @@ VOLUME /var/lib/lotus
|
||||
#VOLUME /var/lib/lotus-worker
|
||||
#VOLUME /var/lib/lotus-wallet
|
||||
|
||||
|
||||
|
||||
EXPOSE 1234
|
||||
EXPOSE 2345
|
||||
EXPOSE 3456
|
||||
|
@ -4,9 +4,9 @@ source ${CERC_CONTAINER_BASE_DIR}/build-base.sh
|
||||
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
||||
|
||||
# Use a release version tag to match the modified Dockerfile replaced in next step
|
||||
git -C ${CERC_REPO_BASE_DIR}/lotus checkout v1.26.3
|
||||
git -C ${CERC_REPO_BASE_DIR}/lotus checkout master
|
||||
|
||||
# Replace repo's Dockerfile with modified one
|
||||
cp ${SCRIPT_DIR}/Dockerfile ${CERC_REPO_BASE_DIR}/lotus/Dockerfile
|
||||
|
||||
docker build -t cerc/mainnet-lotus:local ${build_command_args} ${CERC_REPO_BASE_DIR}/lotus
|
||||
docker build -t cerc/lotus-mainnet:local ${build_command_args} ${CERC_REPO_BASE_DIR}/lotus
|
Loading…
Reference in New Issue
Block a user