Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arm64 dockerfile update #105

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 21 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
ARG BRANCH=latest
ARG FHENIX_VERSION=latest
ARG DOCKER_NAME=ghcr.io/fhenixprotocol/nitro/fhenix-node-builder:$BRANCH

FROM rust:1.74-slim-bullseye as warp-drive-builder
FROM rust:1.77-slim-bullseye as warp-drive-builder

WORKDIR /workspace
RUN export DEBIAN_FRONTEND=noninteractive && \
Expand Down Expand Up @@ -81,16 +82,32 @@ COPY Makefile fheos/

RUN cd fheos && make build

FROM ghcr.io/fhenixprotocol/localfhenix:v0.1.0-beta5
#For versions predating 2.3.0 you need to specify localfhenix-arm if you need an arm build
FROM ghcr.io/fhenixprotocol/localfhenix:$FHENIX_VERSION

# **************** setup dlv

ENV GOROOT=/usr/local/go
ENV GOPATH=/go/
ENV PATH=$PATH:/usr/local/go/bin:$GOPATH/bin

ADD https://go.dev/dl/go1.20.linux-amd64.tar.gz go.linux-amd64.tar.gz
RUN sudo tar -C /usr/local -xzf go.linux-amd64.tar.gz
RUN set -eux; \
ARCH=$(dpkg --print-architecture); \
case "${ARCH}" in \
amd64) \
GOARCH="amd64"; \
;; \
arm64) \
GOARCH="arm64"; \
;; \
*) \
echo "Unsupported architecture: ${ARCH}"; \
exit 1; \
;; \
esac; \
curl -L -o go.linux-${GOARCH}.tar.gz https://go.dev/dl/go1.20.linux-${GOARCH}.tar.gz; \
sudo tar -C /usr/local -xzf go.linux-${GOARCH}.tar.gz; \
rm go.linux-${GOARCH}.tar.gz

RUN sudo chown user:user /usr/local/go

Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ To generate solidity code use `cd solgen && pnpm build`. This will generate `FHE

To run a test with a standalone nitro node, use the included `Dockerfile` (or `Dockerfile.debug` for that variant) - this removes the complexity of having to be familiar with the entire base chain build process.

You might need to specify the localfhenix version, in such case:
```bash
docker buildx build . --build-arg LOCALFHENIX=v2.3-rc.3
```

```bash
docker build -f Dockerfile -t temp .
docker run -it -p 8547:8547 temp
Expand Down
Loading