Cannot run docker's container

Discussion about Docker
Locked
User avatar
aragkat
Posts: 2
Joined: 19 Oct 2020, 23:29

Cannot run docker's container

Post by aragkat »

Hi all, I just bought my F2-221.
Ii'm trying to run a Docker Container, but I have many problems using the app.
I installed Docker, and downloaded an "ubuntu" image.
Going to "Run" it, I don't know which is the loading path (looking for "ubuntu" inside "usr" folder from ssh i cannot find anything).

Moreover, if I log in through SSH and try to run "docker run ubuntu" or "docker exec ubuntu bash", it always returns "Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post http://%2Fvar%2Frun%2Fdocker.sock/v1.29/containers/ubuntu/exec: dial unix /var/run/docker.sock: connect: permission denied".

Could someone help me to run a container?

(sorry for bad english)
User avatar
TMSupport
TerraMaster Team
Posts: 2314
Joined: 13 Dec 2019, 15:15

Re: Cannot run docker's container

Post by TMSupport »

You should SSH access your TNAS as root. The password is the same as admin's.
Use docker attach to enter the Docker container
  Docker provides the attach command to enter the Docker container.
   Next, create a guarded Docker container, and then use the docker attach command to enter the container.
# docker run -itd ubuntu:14.04 /bin/bash
   Then use docker ps to view the container information, and then use docker attach to enter the container
#docker attach 44fc0f0582d9
To contact our team, please send email to following addresses, remember to replace (at) with @
Technical team: support(at)terra-master.com (for technical support)
Service team: service(at)terra-master.com (for purchasing, return, replacement, RMA service)
User avatar
aragkat
Posts: 2
Joined: 19 Oct 2020, 23:29

Re: Cannot run docker's container

Post by aragkat »

I tried but every "docker" command I run on SSH it returns me always the same message:

"Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock:"
User avatar
nullren
Posts: 5
Joined: 29 Nov 2020, 07:57

Re: Cannot run docker's container

Post by nullren »

your user needs to be part of the docker group. if you ssh in as root, you can add your user to the docker group with usermod, something like this:

Code: Select all

usermod -a -G docker nullren
change nullren to whatever your user name is. then login as your user and docker commands will work.
Locked

Return to “Docker”