How to solve the 'no such file' error in docker? - docker

I am new to docker. When I am trying to run the following code in Docker (powershell),
docker run -v 'pwd':/work name/exercise
I am getting the following error
/bin/sh: 1: cannot open /work/my-saying.txt: No such file.
But the file exists

This can be due to many issues since it's not very clear:
check that you're sharing your drives
check if there's any permission restriction on that file
docker run -v /work:name/exercise4 , there's a missing : in your
command

Related

How to use fscrawler in ubuntu?

Is it possible to use fscrawler in ubuntu? I have used on windows and it works fine. When I try to follow the same implementation on ubuntu I am getting all kind of errors.
First I just tried to pull the docker image and run it according to this guide https://fscrawler.readthedocs.io/en/latest/installation.html#installation and getting the image with docker pull dadoonet/fscrawler
When I tried to run it with docker run -it --rm -v /home/index:/root/.fscrawler -v /home/messages:/tmp/es:ro dadoonet/fscrawler fscrawler job_name I got this error
/usr/bin/fscrawler: 47: /usr/bin/fscrawler: ps: not found
ERROR StatusLogger Reconfiguration failed: No configuration found for '4e0e2f2a' at 'null' in 'null'
After that I tried to fllow this tutorial fscrawler tutorial to install it and use it in linux. Idownloaded the fscrawler-es7-2.8-SNAPSHOT version, but running bin/fscrawler resumes in the folder where I unzipped the files just gave me this error bin/fscrawler: command not found
Is there any way to use fscrawler in a linux system?
It's a bug on Docker. (https://github.com/dadoonet/fscrawler/issues/1229)
If you install it manually (install the JVM and FSCrawler) it should work well.

Trying to run quickstart. Error no image ID

Followed instructions and installed Docker for the first time. Then I input everything in terminal as stated. Error on make up language=node
cannot write /var/folders/fw/44x2zkk9337ddrtbq5cp5w940000gn/T/tmph4o_dkt6 because server did not provide an image ID
ERROR: Service 'frontend' failed to build : Build failed
make: *** [up] Error 1
zsh: command not found: #
This looks like a Docker issue - See this thread here:
docker buildx install
The above command seemed to work for these folks.

cp: cannot stat on ./startFabric.sh in Docker for Hyperledger Fabric-Writing Yout First Application

I am currently trying to learn Hyperledger Fabric. I have followed all the instructions till here. I have gotten all the necessary binaries and downloaded all the required samples. When I go into the Fabcar folder and use the "ls" command, I can see all the files expected according to the document EXCEPT chaincode.
$ ls
creds/ invoke.js package.json query.js startFabric.sh*
When I run "./startFabric.sh" command, I get the following errors:
$ ./startFabric.sh
cp: cannot stat '/c/Users/Vaibhav': No such file or directory
cp: cannot stat 'Shah/fabric-samples/fabcar/creds/*': No such file or directory
I am attaching a screenshot of the entire Docker interface below.
Thank you very much.
Screenshot of error in Docker
Check this example in https://github.com/hyperledger/fabric/tree/release/examples/e2e_cli
This is the end-to-end test of the fabric using the command line interface. It helps you understand installation, setting up channels and executing if I recall chaincode_example02. Obviously, this runs on Ubuntu 14.04.
If you are a Windows user, you may want to spin up an Ubuntu 14.04 VM and try out, after installing all the pre-requisites.

Docker-compose throwing error

Hello guys I'm trying to get my vagrant up but the docker keeps on throwing an error which is given below :
Can't find a suitable configuration file in this directory or any parent. Are you in the right directory
The file is present at the root of my project. It was all working well but it just started to throw an error. Can somebody tell me what is it that I have done due to which I'm getting this error
well, I had this error but it was due to vagrant. If you are running vagrant then first of all enter into your vagrant machine using :
vagrant ssh command
and try to find the file over there. If you don't have it over there then this is the problem. That file is not being loaded over here because of which you are getting this error.
My error was coming because vagrant was not mounting the nfs partition because of which the whole project was not loading in the vagrant machine and after that, the docker command was being run. Since the project was not being loaded docker command was not able to find the required file.
If this is your problem try to mount your nfs partition first.
Run:
docker-compose -f rootoftheprojectpath/docker-compose.yml up -d
Check read permissions, typos, etc. Also check that your file is not empty
Regards

"docker-compose up" fails with error

I want to work on a project, but I need to use docker for running the app, but the docker-compose up command fails with this error:
System error: exec: "./wait_to_start": stat ./wait_to_start:
no such file or directory
The wait_to_start command is an executable python script in the subfolder backend/.
I need to determine why it cannot be executed. Either it's been searched in the wrong path, or there are access right problems, or maybe the wrong python version is used.
Can I debug it with details, or login with SSH and check the files on the virtual machine? I'm too unexperienced with Docker...
You can either set the "workdir" metadata to make sure you are in the right place when you start a container or simply call /backend/wait_to_start instead of ./wait_to_start so you remove the need to be in the proper directory.
Do debug with docker-compose I would do this:
docker-compose run --entrypoint bash <servicename>
That should give you a prompt and let you inspect the file and working directory, so see what's wrong.

Resources