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

Unable to use mazzolino/docker arm32v7 #2

Closed
H-Sf opened this issue Aug 30, 2022 · 2 comments
Closed

Unable to use mazzolino/docker arm32v7 #2

H-Sf opened this issue Aug 30, 2022 · 2 comments

Comments

@H-Sf
Copy link

H-Sf commented Aug 30, 2022

Hello Sir,

I'd like to thank you for this dind version for the arm32v7 architecture.
I tried to use it (mazzolino/docker and mazzolino/docker:20-dind) for a workaround in a swarm compose file but it failed.

Here is an extract from the compose file :


Services:
  my-service-handler:
    image: mazzolino/docker:20-dind
    user: root
    command: 'docker-compose -f ./docker-compose.yml up'
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - /home/pi/docker-compose.yml:/docker-compose.yml
    deploy:
      mode: global

Here is the output of sudo docker service ps stacktest_my-service-handler

srnt9hef1bj0   stacktest_my-service-handler.klzllydxi1y96ugyndv6pipdr       mazzolino/docker:20-dind   raspberrypi   Ready           Ready less than a second ago       
kwcg0le1bx3z    \_ stacktest_my-service-handler.klzllydxi1y96ugyndv6pipdr   mazzolino/docker:20-dind   raspberrypi   Shutdown        Failed 1 second ago            "task: non-zero exit (127)"
kddvc0r4lf96    \_ stacktest_my-service-handler.klzllydxi1y96ugyndv6pipdr   mazzolino/docker:20-dind   raspberrypi   Shutdown        Failed 9 seconds ago           "task: non-zero exit (127)"
5ua7tgry3w46    \_ stacktest_my-service-handler.klzllydxi1y96ugyndv6pipdr   mazzolino/docker:20-dind   raspberrypi   Shutdown        Failed 18 seconds ago          "task: non-zero exit (127)"
tj2wblskr7as    \_ stacktest_my-service-handler.klzllydxi1y96ugyndv6pipdr   mazzolino/docker:20-dind   raspberrypi   Shutdown        Failed 26 seconds ago          "task: non-zero exit (127)" ```


Could you please tell me if I am using it wrongly.

Thank you in advance for your time and answer.
@djmaze
Copy link
Owner

djmaze commented Aug 30, 2022

@H-Sf You are trying to run docker compose from inside the dind container. That does not work because the container does not contain docker compose.

I am not sure what you want to achieve, but you should probably use your docker-compose.yml as a swarm compose file and then just change the service which needs to run privileged so it gets run as a container by the dind image.

Like this:

version: "3.7"

services:
  service1:
    # ...
  service2:
    # ...
  privileged_service:
    image: mazzolino/docker:20-dind
    command: docker run --rm <YOUR PRIVILEGED IMAGE AND OPTIONS>
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock

(By the way, if you are posting code snippets here, please use the 3 backticks (```) notation.)

@H-Sf
Copy link
Author

H-Sf commented Aug 31, 2022

Thank you so much for your quick reply. It works perfectly now.
Thank you so much for this images created for arm32v7, it saved me.

In fact, I'm using raspberry pi 3 on a Pi-car so I need to access to the camera device.
It was working perfectly with docker-compose but when I tried to create a swarm cluster I found that the options --device and --privileged are not handled for security purposes.
I found a workaround suggested here and needed a Docker image for arm32v7 and found the one you gently proposed.

Thank you again for all your help and time.

@H-Sf H-Sf closed this as completed Aug 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants