Git Product home page Git Product logo

Comments (4)

mlinksva avatar mlinksva commented on June 5, 2024 1

Should licensed.gemspec include https://guides.rubygems.org/specification-reference/#required_ruby_version so that gem install licensed would fail and say why?

from licensed.

jonabc avatar jonabc commented on June 5, 2024

@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 & operator, causing the syntax error.

There are two ways to fix this.

If you want to use a ruby base docker image, you can install different versions of nodejs in your docker image by following https://github.com/nodesource/distributions#installation-instructions. It looks like you'd want the 8.x installer.

If you want to use a node base docker image, you can install more recent versions of ruby installing and using ruby-install. You'll need Ruby >= 2.3.0 I think.

Let me know if you have any other questions 🙇

from licensed.

cnaslain avatar cnaslain commented on June 5, 2024

@jonabc I've tried the official ruby image + custom setup for nodejs; works like a charm. Thanks!
PS: I also tried the nodejs + manually install ruby; it works too but the docker image is much bigger and more complicated to build; so starting by ruby is the best choice.

For those who are interested in using docker:

FROM ruby:2.4.4-jessie
RUN echo deb http://ftp.debian.org/debian jessie-backports main >> /etc/apt/sources.list
RUN apt-get update &&
apt-get install -y cmake pkg-config
RUN gem install licensed
RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - &&
apt-get install -y nodejs
RUN useradd --no-log-init --create-home -r -u 1000 -g users test
RUN mkdir /app &&
chown test:users /app
USER test
WORKDIR /app

from licensed.

jonabc avatar jonabc commented on June 5, 2024

@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.

from licensed.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.