Skip to content

Commit

Permalink
build fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathan@vulcanize.io committed Apr 26, 2024
1 parent 9ffa37c commit 277fbae
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ 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"
deploy:
restart_policy:
condition: on-failure
delay: 30s
command: ["lotus", "daemon"]
entrypoint: ["sh", "/docker-lotus-entrypoint.sh"]
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 ""
Expand All @@ -95,7 +89,6 @@ USER fc

EXPOSE 1234

ENTRYPOINT ["/docker-lotus-entrypoint.sh"]

CMD ["-help"]

Expand All @@ -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
Expand All @@ -132,6 +131,8 @@ VOLUME /var/lib/lotus
#VOLUME /var/lib/lotus-worker
#VOLUME /var/lib/lotus-wallet



EXPOSE 1234
EXPOSE 2345
EXPOSE 3456
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 277fbae

Please sign in to comment.