Skip to content

Commit 2663934

Browse files
authored
chore(docs): #1289 add docker guide for apple silicon (#1290)
add docker guide for apple silicon and ARM chip
1 parent c9fb205 commit 2663934

File tree

2 files changed

+32
-2
lines changed

2 files changed

+32
-2
lines changed

docs/src/pages/quick-start.md

+11
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,17 @@ When using remote configuration file, you can use the `--config-interval` to tel
9191
monika -c https://raw.githubusercontent.com/hyperjumptech/monika/main/config_sample/config.desktop.example.yml --config-interval 10
9292
```
9393

94+
## Run Monika on Docker
95+
96+
```bash
97+
docker run --name monika \
98+
--net=host \
99+
-d hyperjump/monika:latest \
100+
monika -c https://domain.com/path/to/your/configuration.yml
101+
```
102+
103+
**On ARM / Apple Silicon chip**, you need to pass `--platform linux/amd64` to docker.
104+
94105
Congratulations, you have successfully run Monika in your machine!
95106

96107
## Next Step

docs/src/pages/tutorial/run-in-docker.md

+21-2
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,32 @@ id: run-monika-in-docker
33
title: Run Monika in Docker
44
---
55

6-
Monika is available as a docker image. You can find the image in the docker hub as `hyperjump/monika`, or pull the image with the following command:
6+
Monika is available as a docker image. You can find the image in the docker hub as `hyperjump/monika`, or pull the image with the following command
77

88
```bash
99
docker pull hyperjump/monika
1010
```
1111

12-
Once you've pulled the latest image, you can run it using:
12+
## Running Monika on ARM / Apple Silicon
13+
14+
Monika docker image only supports amd64 architecture, you have to pass `--platform linux/amd64` when using `hyperjump/monika` docker image
15+
16+
```bash
17+
docker pull --platform linux/amd64 hyperjump/monika
18+
```
19+
20+
Once you've pulled the latest image, you can run it using
1321

1422
```bash
1523
# Run Monika in foreground
1624
docker run --name monika --net=host -it hyperjump/monika:latest
1725

1826
# Or, if you prefer to run Monika in the background
1927
docker run --name monika --net=host --detach hyperjump/monika:latest
28+
29+
# On ARM / Apple Silicon chip, pass --platform linux/amd64
30+
docker run --name monika --net=host --platform linux/amd64 -it hyperjump/monika:latest
31+
docker run --name monika --net=host --platform linux/amd64 --detach hyperjump/monika:latest
2032
```
2133

2234
In the example above, we create a container from the hyperjump/monika base image naming it with`--name monika`, indicate we'll use the host machine's network configuration with `--net=host` and let it run in the backround using the `--detach` switch (or interactively with `-it`).
@@ -42,6 +54,13 @@ docker run --name monika_interactive \
4254
-d hyperjump/monika:latest \
4355
monika -c /config/myConfig.yml --prometheus 3001
4456

57+
# On ARM / Apple Silicon
58+
docker run --name monika_interactive \
59+
--net=host \
60+
--platform linux/amd64 \
61+
-v ${PWD}/config:/config \
62+
-d hyperjump/monika:latest \
63+
monika -c /config/myConfig.yml --prometheus 3001
4564
```
4665

4766
## Troubleshooting

0 commit comments

Comments
 (0)