-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docker environment to run licensed from command line: "pip.rb:48: syntax error, unexpected '.' (SyntaxError)" #47
Comments
@cnaslain 👋 sorry for the difficulties. The issue with your second docker image is that the version of ruby is a bit old and doesn't support the There are two ways to fix this. If you want to use a If you want to use a Let me know if you have any other questions 🙇 |
Should |
@jonabc I've tried the official ruby image + custom setup for nodejs; works like a charm. Thanks! For those who are interested in using docker: FROM ruby:2.4.4-jessie |
@cnaslain if you're still evaluating licensed, this scenario should be a bit simpler. licensed executables for darwin/mac and linux are shipped as of the 1.2.0 release. You should be able to curl the executable directly into a docker container set up for your project - no need to use a base ruby docker image or install ruby just to use licensed. |
Hi,
I've been asked to evaluate this tool in a POC for an internal application. Licensed; looks nice and interesting. I'm not a ruby developer/user, more someone from the CI/CD team, and our app is not written in ruby but uses npm as package manager. I plan to integrate a licensed check step into our Jenkins pipeline and instead of installing licensed in our CI nodes, I choose to build a docker image so I can mount our code and run licensed into a docker container.
I first start with creating a Docker image from the official ruby image (as licensed was written in ruby); here is my Dockerfile:
Build the image:
docker build --rm -t licensed:ruby-2.3.7 .
Here is my licensed app config: .licensed.yaml
... and my package.json:
Then I can mount the app and run licensed; here is a simple example:
This worked fine with this simple test1 example. Great!
My problems comes when I tried to use the real package.json from my app, having something 40+ main dependencies (approx 500 dependencies in total after running npm). When I run npm update with this json file; npm returns errors. I asked the developers for help and they told me that the npm engine that I used was too old; they requires a npm 8.9.3 version. This first docker image have a npm 1.4.21 version.
Instead of creating the docker image from ruby; I thought that it should be easier to start with a nodejs image to avoid having the npm issue.
Here is my second Docker image from node:
Build the image:
docker build -f Dockerfile.node --rm -t licensed:node-8.11 .
Then I run the same test with this new image:
Licensed failed (even a licensed help command fails).
Here are some additional information regarding config & installed gems:
I don't know what exactly is missing in this docker image to run licensed. I've tried install python-pip and pip gem; and start building licensed from source but it does not fix this and it was not part of the 1st ruby image... still the same error.
Help/idea appreciated ^^
Regards,
Chris
The text was updated successfully, but these errors were encountered: