Closed saurabhb17 closed 3 years ago
Did the Step 2 ./docker_setup.sh
work fine?
The Step 3 ./build.sh
, from which folder are you running it? That is not required.
I will add the documentation to add the current user to the docker group.
yes, the step 2 worked fine.
Produced following message:/usr/bin/docker Good. Docker is installed!
Output log file: /home/saurabh/ajit/ajit-toolchain/build/docker_build.log
~/ajit/ajit-toolchain/docker/ajit_base ~/ajit/ajit-toolchain ~/ajit/ajit-toolchain ~/ajit/ajit-toolchain/docker/ajit_build ~/ajit/ajit-toolchain ~/ajit/ajit-toolchain ~/ajit/ajit-toolchain/docker/ajit_tools ~/ajit/ajit-toolchain ~/ajit/ajit-toolchain
I ran the build.sh from docker/ajit_base/ directory. After the build.sh gave warnings, I tried running run.sh: Got this response ->
saurabh@saurabh-HP-Laptop-15g-br1xx:~/ajit/ajit-toolchain/docker/ajit_base$ ./run.sh Ajit: Removing any container with name 'ajit_base' Error: No such container: ajit_base Ajit: Starting container with name 'ajit_base' Unable to find image 'ajit_base:1.0' locally docker: Error response from daemon: pull access denied for ajit_base, repository does not exist or may require 'docker login'. See 'docker run --help'. Ajit: Docker container started? Status: 125
please show me the output of docker image ls
saurabh@saurabh-HP-Laptop-15g-br1xx:~/ajit/ajit-toolchain$ docker image ls
REPOSITORY TAG IMAGE ID CREATED SIZE
94392b4277b9 About an hour ago 131MB ubuntu 16.04 dfeff22e96ae 2 weeks ago 131MB
Okay this shows that the images were not created. Please refer to the log file ./build/docker_build.log
. Can you send me the file?
I am unable to access the file via the url. I have requested access though, on the form that google presented.
Okay. The file shows the following error:
Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock
Hence no images are getting created.
I believe you must have created a docker group and added yourself to it, with commands similar to,
sudo groupadd docker;
sudo usermod -aG docker ${USER};
If so, then you need to logout and login again to let that take effect. Then the issue should not arise. I will add a script to help user do the same. The issue is that the docker is not setup and installed properly (i.e. not given correct permissions).
In any case you can always run docker with sudo and things would work nicely, without needing all these steps.
I logged out and logged in but the build log was showing the same permission denied message. I even rebooted and followed the necessary steps, no avail!
In any case you can always run docker with sudo and things would work nicely, without needing all these steps.
I am completely new to dockers so can you elaborate this? docker_setup.sh is going to create the docker images through the build.sh using the docker build --tag $_IMG_NAME:${TAG} command.
Shall I change this last line to sudo docker build --tag $_IMG_NAME:${TAG} and try again? Is that what you were trying to convey?
Effectively you need to setup docker such that you can issue the docker command without the sudo permission.
If that's not the case you can always use sudo. So use,
sudo ./docker_setup.sh;
Though, I would not recommend using sudo. Make sure that when you use sudo the AJIT_HOME env
is accessible in the sudoed environment. Or
become root with sudo su
and then issue
all the commands.
went with sudo su:
attached log here, daemon socket error is not there, but packages are still not being fetched.
AFAIK these errors occur when the system cannot connect to the internet. Are you running these commands on a remote machine. If so you may need to login to the internet.iitb.ac.in on that remote machine to access the internet.
switched over to another WiFi network and the ajit_base dependencies seem to be getting solved. sorry about all the noise. I will close this once all images are built.
@saurabhb17 did you succeed in building the images??
Yes, I was able to build the images
On Fri, Nov 13, 2020, 2:29 PM Vishnu Easwaran E notifications@github.com wrote:
@saurabhb17 https://github.com/saurabhb17 did you succeed in building the images??
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/adhuliya/ajit-toolchain/issues/10#issuecomment-726637592, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKQCOVFRPV4HSOYJ57WIS4DSPTYOLANCNFSM4TS3X2DA .
I did face some issues while running ajit_build.sh, though:
Ajit: Removing any container with name 'ajit_build' Error: No such container: ajit_build Ajit: Starting container with name 'ajit_build' Unable to find image 'ajit_build:1.0' locally docker: Error response from daemon: pull access denied for ajit_build, repository does not exist or may require 'docker login'. See 'docker run --help'. Ajit: Docker container started? Status: 125
This was after running the run.sh in docker/ajit_build/
For ajit_base, I am able to get in the container, open a shell and execute commands
By following steps given in the README files, and running the certain scripts, I found out that docker group needs to be created and added to my user. After doing that by following said steps, I started from scratch Step-1 source ./ajit_home_env Step-2 ./docker_setup.sh Step-3 ./build.sh This yielded following message:
How to resolve this?