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

[FIX] Everest Not running on Mac silicon **no matching manifest for linux/arm64/v8 in the manifest list entries** #286

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
119 changes: 119 additions & 0 deletions Server/everest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,125 @@ You will notice that there are two args that are configurable:
After running `npm run start-everest` (or the Windows alternative), you should see 3 running EVerest containers
and the `manager` container should have the appropriate EVerest logs.


### Running EVerest on Mac ARM64 (M1/M2)

If you're on a Mac with an ARM64 processor (like an M1 or M2 chip), you may run into some architecture compatibility issues. Here’s how to set up EVerest so it runs seamlessly on macOS ARM64 devices.

To get started, make a few adjustments to the docker-compose.yml and Dockerfile:

Specify Platform Compatibility
Since EVerest images are typically built for AMD64, we need to add `platform: linux/amd64` under each service in `docker-compose.yml.` This setting enables Docker to run the containers in AMD64 emulation mode, making them compatible with ARM64 hardware.

Hardcode Environment Variables
If dynamic build arguments aren’t used, you can directly specify values for `EVEREST_IMAGE_TAG` and `EVEREST_TARGET_URL` under each service’s environment section. This keeps things simple without needing extra configuration steps.

In the manager service of your docker-compose.yml, use context: . to specify the current directory as the build context. This tells Docker to locate the Dockerfile and any other required files within this directory. Set up your manager service as follows:

- manager:
build:
context: .
dockerfile: Dockerfile
...

Network Bridge Setup
To make sure all EVerest services communicate correctly, define a bridge network. You can do this by adding a networks section to `docker-compose.yml`, like so:



- networks:
everest-net:
driver: bridge
Then link each service to this bridge by adding networks: - everest-net under each service.

Final docker-compose.yml Example

- Here’s an example of the updated docker-compose.yml file for Mac ARM64:

version: '3.8'

services:
mqtt-server:
image: ghcr.io/everest/everest-demo/mqtt-server:0.0.16
platform: linux/amd64
networks:
- everest-net
logging:
driver: none

manager:
build:
context: .
dockerfile: Dockerfile
platform: linux/amd64
ports:
- 8888:8888
networks:
- everest-net
depends_on:
- mqtt-server
environment:
- MQTT_SERVER_ADDRESS=mqtt-server
- EVEREST_TARGET_URL=ws://host.docker.internal:8081/cp001
- EVEREST_IMAGE_TAG=0.0.16
sysctls:
- net.ipv6.conf.all.disable_ipv6=0
extra_hosts:
- 'host.docker.internal:host-gateway'

nodered:
image: ghcr.io/everest/everest-demo/nodered:0.0.16
platform: linux/amd64
networks:
- everest-net
depends_on:
- mqtt-server
ports:
- 1880:1880
environment:
- MQTT_SERVER_ADDRESS=mqtt-server
- FLOWS=/config/config-sil-two-evse-flow.json

networks:
everest-net:
driver: bridge

- Here’s an example of the updated DockerFile file for Mac ARM64:

ARG EVEREST_IMAGE_TAG=0.0.16


FROM --platform=linux/amd64 ghcr.io/everest/everest-demo/manager:${EVEREST_IMAGE_TAG}

ARG EVEREST_TARGET_URL=ws://host.docker.internal:8081/cp001
ENV EVEREST_TARGET_URL $EVEREST_TARGET_URL

WORKDIR /workspace

RUN ["/entrypoint.sh"]

RUN apk update && apk add sqlite

RUN sqlite3 /ext/source/build/dist/share/everest/modules/OCPP201/device_model_storage.db \
"UPDATE VARIABLE_ATTRIBUTE \
SET value = '[{\"configurationSlot\": 1, \"connectionData\": {\"messageTimeout\": 30, \"ocppCsmsUrl\": \"$EVEREST_TARGET_URL\", \"ocppInterface\": \"Wired0\", \"ocppTransport\": \"JSON\", \"ocppVersion\": \"OCPP20\", \"securityProfile\": 1}},{\"configurationSlot\": 2, \"connectionData\": {\"messageTimeout\": 30, \"ocppCsmsUrl\": \"$EVEREST_TARGET_URL\", \"ocppInterface\": \"Wired0\", \"ocppTransport\": \"JSON\", \"ocppVersion\": \"OCPP20\", \"securityProfile\": 1}}]' \
WHERE \
variable_Id IN ( \
SELECT id FROM VARIABLE \
WHERE name = 'NetworkConnectionProfiles' \
);"

RUN rm /ext/source/build/dist/etc/everest/certs/ca/v2g/*.*

RUN npm i -g http-server
EXPOSE 8888

COPY ./start.sh /tmp/start.sh
RUN chmod +x /tmp/start.sh
CMD ["sh", "-c", "/tmp/start.sh"]

Finally just run `docker compose up --build`

### EVerest UI

Now that the 3 containers are running in Docker, you should be able to navigate to `[localhost|ip]:1880/ui/` to view
Expand Down