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

#630 Docker image jeroenwillemsen/wrongsecrets:1.5.14-no-vault hangs … #631

Merged
57 changes: 57 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,63 @@ And then at [http://localhost:3000](http://localhost:3000).

Note: be careful with trying to deploy the `jeroenwillemsen/wrongsecrets-desktop` container to Heroku ;-).

## Docker on macOS with M1 and Colima (Experimental!)

NOTE: Colima support is experimental.

Using [Colima](https://github.com/abiosoft/colima) (version 0.5.2 when written) you your macOS with Apple Silicon M1
to run Docker image `jeroenwillemsen/wrongsecrets` you try one of:

- switch off Colima
- change Docker context
- run Colima with 1 CPU

### Switch off Colima

```shell
colima stop
```
and run natively Docker image `jeroenwillemsen/wrongsecrets` on ARM.

### Change Docker context

Running docker image on Colima container runtimes on macOS Ventura with M1 CPU can run very slowly or can hang at some point.
Wrong Secrets provide `arm64` Docker image and switching to `desktop-linux` context will use the native `arm64` image.
To do that in the terminal run:

```shell
docker context ls
```

you should see context default `colima *`:

```
NAME TYPE DESCRIPTION DOCKER ENDPOINT KUBERNETES ENDPOINT ORCHESTRATOR
colima * moby colima unix:///Users/YOUR_USER_NAME/.colima/default/docker.sock
default moby Current DOCKER_HOST based configuration unix:///var/run/docker.sock https://127.0.0.1:6443 (default) swarm
desktop-linux moby unix:///Users/YOUR_USER_NAME/.docker/run/docker.sock
```

Now run one of the above Docker commands together with `--context` switch e.g.:

```bash
docker --context desktop-linux run -p 8080:8080 jeroenwillemsen/wrongsecrets:latest-no-vault
```

### Run Colima with 1 CPU

Colima is using QEMU behind and for QEMU on Apple Silicon M1 is recommended to use 1 CPU core:

```shell
colima start -m 8 -c 1 --arch x86_64
```

and run with AMD x64 emulation e.g.:

```bash
docker run -p 8080:8080 jeroenwillemsen/wrongsecrets:latest-no-vault
```

## Further reading on secrets management

Want to learn more? Checkout the sources below:
Expand Down