Unable to access a file copied in a container - file

I am tryng to run a java application in a container. In my docker file I copy the jar file and then run the jar
ADD project.jar /tmp/project.jar
CMD java -jar /tmp/project.jar
This fails with the following error Error: Unable to access jarfile /tmp/projct.jar However if I run the image with bash and manually navigate t o /tmp and run the java -jar command it works. Are there any more configurations I need to follow?

Related

How to install allure in MAC manually

I am trying to install allure in MAC not able to it.
I am getting the error "-bash: allure: command not found".
I have downloaded allure-commandline-2.9.0.tgz and allure-commandline-2.9.0.zip from the below link: https://repo.maven.apache.org/maven2/io/qameta/allure/allure-commandline/2.9.0/
I tried with both but it is not working.
Steps I have followed:
download the .tgz or .zip file.
unzip/untar the file.
set /allure-2.9.0/bin dir to the PATH variable.
Restart the terminal.
trying to run allure --version command.
But I am getting the error "-bash: allure: command not found".
Your installation folder of the tool is not /allure-2.9.0/bin
A good practise is to create a "bin" folder inside your user-account: "~/bin" and include this to the $PATH environment. From now on you can link or copy your extracted tool from e.g. ~/Downloads/allure-2.9.0/bin to ~/bin
You don't have to extend the PATH variable for each new tool.

docker executable file not found in $PATH" react image

I am trying to run a freshly create react app made with create-react-app in docker. I have a Docker file which succesfully allows me to build the image, but when I try to run it I get:
PS C:\Users\Bertinator\desktop\gamelist\client> docker run client4 .
container_linux.go:265: starting container process caused "exec: \".\":
executable file not found in $PATH"
C:\Program Files\Docker\Docker\Resources\bin\docker.exe: Error response from
daemon: oci runtime error: container_linux.go:265: starting container
process caused "exec: \".\": executable file not found in $PATH".
ERRO[0001] error waiting for container: context canceled
PS C:\Users\Bertinator\desktop\gamelist\client>
This is my Docker file, which is place in the root folder of my create-react-app project:
FROM node:7.8.0
ENV NPM_CONFIG_LOGLEVEL warn
COPY . .
RUN npm run build --production
RUN npm install -g serve
CMD serve -s build
EXPOSE 5000
Are you running from a Linux docker image on a Windows machine? That does not work.
Ref http://training.play-with-docker.com/beginner-linux/
(...) Linux containers require the Docker host to be running a Linux kernel. For example, Linux containers cannot run directly on Windows Docker hosts. The same is true of Windows containers - they need to run on a Docker host with a Windows kernel.
When you say docker run client4 . you are asking docker to run that container and execute the . (dot) command which does not make sense. That is why you are getting the first error.

I'm new to command line. I get a lot of messages like 'command not found' and 'no such file or directory'

Trying to run gcloud init to initialize the Google App Engine Engine SDK by typing ./google-cloud-sdk/bin/gcloud init but it showed: no such file or directory or command not found. Is something wrong with my PATH? My path is:
/Users/AnneLutz/Documents/google-cloud-sdk\
If you typing ./google-cloud-sdk/bin/gcloud init and you installed Cloud SDK in /Users/AnneLutz/Documents/google-cloud-sdk, then your current directory should be /Users/AnneLutz/Documents in order for what you type to work.
That said you should add /Users/AnneLutz/Documents/google-cloud-sdk/bin to you path. To do this, assuming you are using bash you can
source /Users/AnneLutz/Documents/google-cloud-sdk/path.bash.inc
To make it so that every-time you start your shell you can add it to shell profile. For example you can add above source command at the end of ~/.bash_profile file.
It looks like you used the option to download the SDK zip file and are then trying to configure your environment with that download option. If you aren't comfortable with setting environment variables, you might want to instead try installing using the "interactive" installer, which will automate the steps for making the commands always available on your system.
The directions are here, but for Mac OS users are basically:
Enter the following at a command prompt:
curl https://sdk.cloud.google.com | bash
Restart your shell:
exec -l $SHELL
Run gcloud init to initialize the gcloud environment:
gcloud init
For many, this procedure is easier than getting everything configured manually.

Sencha: How to generate all-classes file

Morning,
My production build seems to be missing getOrientation function.
It seems that sencha-touch-all.js is not being copied into the build folder.
After doing much forum reading, etc, I have discovered that I actually need to use Cmd to create an all-classes.js file.
According to http://docs.sencha.com/touch/2.2.0/#!/guide/building, the following command should do the job:
sencha create jsb -a index.html -p app.jsb3
When I run this in command from within the root of my app (where index.html lives), I get the following error:
[ERR] Unknown command: "create"
I have tried using commands generate or build instead of create but they do not work either.
So, why does it not recognise that command?
When I run the command from within my SenchaSDKTools folder, but use the full path/to/app,
it seems to accept the command, but does not create a file.
I have sencha touch 2.2.1 and Cmd 3.1.2.342
In order for you to use sencha create jsb command, you have to:
Install Sencha SDK Tools
Mac - http://cdn.sencha.io/sdk-tools/SenchaSDKTools-2.0.0-beta3-osx.app.zip
Windows - http://cdn.sencha.io/sdk-tools/SenchaSDKTools-2.0.0-beta3-windows.exe
Open terminal and change directory to where the Sencha SDK is installed.
cd /Applications/SenchaSDKTools-2.0.0-beta3/
Generate a JSB3 file by executing the ff. command:
/sencha create jsb -a index.html -p app.jsb3
wherein:
-a (required) The location of the HTML file containing the scripts you want to include
-p (required) The location where the output .jsb3 file should be created
This scans your index.html file for all framework and application files that are actually used by the app, and then creates a JSB file called app.jsb3.
SOLVED:
It was working fine from within the SenchaSDKtools folder. I hadn't told it the right place to create the file.

jar file problem

when i tried to run jar file from netbeans it works fine but when i try to run by command prompt it gives me exexeption in thread error but when i check my task manager it shows the javaw.exe is running..............what it exactly and why this error comes only in command prompt?
compile your application with:
>javac -jar example.jar ClassName.java
Run:
>java -jar example.jar ClassName
Can you please paste the exception that you get.
When running from command line, you have make sure that classpath for your program is set properly.
Make user that you have set the main-class in your manifest file of you jar.

Resources