Created
October 1, 2023 02:52
-
-
Save PreetSangha/7cf9d9d8a524d674c94a5a8b86901609 to your computer and use it in GitHub Desktop.
Problem with Test Containers not starting in podman
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
If you have the podman mac helper | |
> brew install podman-mac-helper | |
If you see something like this: | |
[testcontainers.org 00:00:00.11] Connected to Docker: | |
Host: unix:///var/run/docker.sock | |
Server Version: 4.6.2 | |
Kernel Version: 6.4.15-200.fc38.aarch64 | |
API Version: 1.41 | |
Operating System: fedora | |
Total Memory: 1.91 GB | |
[testcontainers.org 00:00:00.19] Docker container a8bbec0d94f2 created | |
[testcontainers.org 00:00:00.23] Start Docker container a8bbec0d94f2 | |
Docker API responded with status code=InternalServerError, response={"cause":"OCI permission denied","message":"crun: write to `/proc/self/oom_score_adj`: Permission denied: OCI permission denied","response":500} | |
This might be due to a non rootful container machine. | |
on podman stop your machine (`podman machine stop`) | |
set it to rootful and restart it | |
❯ podman machine set --rootful ─╯ | |
❯ podman machine start ─╯ | |
Starting machine "podman-machine-default" | |
Waiting for VM ... | |
Mounting volume... /Users:/Users | |
Mounting volume... /private:/private | |
Mounting volume... /var/folders:/var/folders | |
API forwarding listening on: /var/run/docker.sock | |
Docker API clients default to this address. You do not need to set DOCKER_HOST. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The problem could also be due to container ryuk not starting on VM with low memory so try setting the docker/podman machine to have more ram
e.g.