diff --git a/stack_orchestrator/data/compose/docker-compose-mainnet-lotus.yml b/stack_orchestrator/data/compose/docker-compose-mainnet-lotus.yml index a3f24374..e91a42b4 100644 --- a/stack_orchestrator/data/compose/docker-compose-mainnet-lotus.yml +++ b/stack_orchestrator/data/compose/docker-compose-mainnet-lotus.yml @@ -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"] diff --git a/stack_orchestrator/data/container-build/cerc-mainnet-lotus/Dockerfile b/stack_orchestrator/data/container-build/cerc-mainnet-lotus/Dockerfile index 8cfa4a44..3170fea6 100644 --- a/stack_orchestrator/data/container-build/cerc-mainnet-lotus/Dockerfile +++ b/stack_orchestrator/data/container-build/cerc-mainnet-lotus/Dockerfile @@ -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 diff --git a/stack_orchestrator/data/container-build/cerc-mainnet-lotus/build.sh b/stack_orchestrator/data/container-build/cerc-mainnet-lotus/build.sh index d808ceff..70236044 100755 --- a/stack_orchestrator/data/container-build/cerc-mainnet-lotus/build.sh +++ b/stack_orchestrator/data/container-build/cerc-mainnet-lotus/build.sh @@ -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 \ No newline at end of file +docker build -t cerc/lotus-mainnet:local ${build_command_args} ${CERC_REPO_BASE_DIR}/lotus \ No newline at end of file