npm: not found when building Docker container - docker

I had a developer create a Docker file for me -- and it's worked for months flawlessly. Recently I formatted my mac to clean some space, and re-ran the command to build the Docker container, and I got the following error:
See this screenshot
I'm not quite sure what the problem is. It builds properly on my other machines, but it's giving me a hard time on this new fresh install. I'm not a technical person, thanks everyone.

By looking at your screenshot it seems like you are not installing npm.
Please add npm to your apt-get install RUN command.

Related

Yarn requires Node.js 4.0 or higher to be installed. - Symfony - Docker - Yarn

I'm trying to install yarn in my symfony project, but did not succeed yet.
I installed nodejs and all needed requirements on windows. When I type node -v or yarn -v inside a windows cmd, it displays versions for the respective tools as expected.
But in my symfony project inside the container, it seems like the node and yarn commands can't be found.
Here is a screentshot of my Directory
When I type yarn -v or yarn install it gives the following error:
Yarn requires Node.js 4.0 or higher to be installed.
I don't know how to fix this error. Can someone point me in the right direction?
Yarn requires Node.js 4.0 or higher to be installed.
Currently working on Windows 8.1 and first had this issue recently when working with Gatsby and also with Rails, this issue persisted even though everything was up to date, what worked for both instances was running the CMD Line in the project directory as Administrator, then running yarn commands.
Seems to only work in the CMD Line, this was just a hunch and it worked.
Sure there is a reference but couldn't find it in the Documentation to prove the above, if anyone in future comes across the Docs, kindly link it to this post.

Qt platform plugin Error in runnig container. how to show open cv output image with docker container on linux?

I wanna create a docker image on windows and image base [in docker file] for docker image would be linux os. My program uses the open-cv program which its output image has to be shown with CV2.imshow(). but after running container, I get this error.
please help to fix it.
qt.qpa.xcb: could not connect to display
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/usr/local/lib/python3.9/site-packages/cv2/qt/plugins" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: xcb.
I had this same issue and none of the solutions I looked up solved the issue for me. I even used xhost + and imshow still did not work.
I was using the image tensorflow/tensorflow:2.7.0-gpu as my base image for my project. Seems like the package libsm6 is missing for some reason, and doing apt install libsm6 made it work.
Hope this helped!
I also had this issue. The one solution that finally worked was to install an earlier version of opencv-python. The version I had originally installed was 4.6.0.66. I uninstalled opencv pip uninstall opencv-python in docker and reinstalled RUN pip install opencv-python==4.1.2.30 in the dockerfile.

Docker: not found

I started having this issue today after macOS High Sierra update.
I went ahead and uninstalled docker via Docker > Preferences.
Installed fresh docker and I still can't get the following command to work
docker info
It works for root user, but not for my user.
There is an open issue in docker for mac https://github.com/docker/for-mac/issues/2357
Apparently new version of H Sierra, does not work properly with docker for mac
[https://github.com/docker/for-mac/issues/47]
After setting docker.sock path, I could not find com.docker.docker.
So, instead of docker for mac, I installed docker using brew command,
then run
brew cask install docker
Now, click on the whale icon and click allow for all the successive prompts. Now, try re running the build with the tag you want.
docker build -t <name> .
Now, this works as expected. please try. This resolved my problem. hope it helps.
try install using brew
brew install docker

Command `bundle` unrecognized. Did you mean to run this inside a react-native project?

I am currently upgrading to the most recent version of react from 0.11.0 branch.
I have upgraded successfully through each step with minimal issues but when I got to 0.14.0 I hit some issues with:
node_modules/react-native/packager/react-native-xcode.sh
No matter what I do all my machines seem to get this same error.
Command `bundle` unrecognized. Did you mean to run this inside a react-native project?
I also run this same command that script runs from my terminal in the same location and it works fine, I have also set the path as well and before the script runs no mas, set path inside the script still nothing.
I am hoping someone else has saw this and has found a solution or is there a work around so we dont need this script.
I started this project with react-native ~0.6.0 maybe even a little earlier.
I have even removed nvm to combat this issue and using single install of node which is on PATH in both conditions.
Thanks!
Have you installed the latest version of react-native-cli globally?
npm uninstall -g react-native-cli
npm install -g react-native-cli
I personally preferred to install it as a dev dependency.
yarn add -D react-native-cli

Terminal hangs when installing rb-rmagick

I'm trying to install rb-rmagick and running into some trouble. The installation stops at "Building rb-rmagick". I know it takes a while, so I let it run overnight, but still don't see any progress. I'm running it on a brand new MacBook Pro so speed/memory shouldn't be an issue.
From http://rb-rmagick.darwinports.com/, the instruction says to do cd /opt/local/bin/portslocation/dports/rb-rmagick before you run sudo port install rb-rmagick, but I don't have the portslocation directory in my bin.
I've installed macPort.
I found out there's actually an error after doing sudo port -v install rb-rmagick. A font file was missing. There are a couple of ways to solve this. trac.macports.org/ticket/19602 has some explanation.

Resources