Public Repository

Last pushed: 2 years ago
Short Description
From ruby 2.2.1, installs latest node, and apt gets common database libraries
Full Description

Dockerfile as follows:

FROM ruby:2.2.1

# update package lists
RUN apt-get update

#RUN apt-get install -y nodejs --assume-yes --no-install-recommends && rm -rf /var/lib/apt/lists/*
# http://stackoverflow.com/questions/20886217/browserify-error-usr-bin-env-node-no-such-file-or-directory


# Install Node.js
RUN \
  cd /tmp && \
  wget http://nodejs.org/dist/node-latest.tar.gz && \
  tar xvzf node-latest.tar.gz && \
  rm -f node-latest.tar.gz && \
  cd node-v* && \
  ./configure && \
  CXX="g++ -Wno-unused-local-typedefs" make && \
  CXX="g++ -Wno-unused-local-typedefs" make install && \
  cd /tmp && \
  rm -rf /tmp/node-v* && \
  npm install -g npm && \
  echo -e '\n# Node.js\nexport PATH="node_modules/.bin:$PATH"' >> /root/.bashrc


# use update-alternatives to indicate your nodejs binary is responsible for #!/usr/bin/env node
#RUN update-alternatives --install /usr/bin/node nodejs /usr/bin/nodejs 100

# see http://guides.rubyonrails.org/command_line.html#rails-dbconsole
# refrences to freetds are required if your rails app will use gem tidytds to access SQL Server
RUN apt-get update && apt-get install -y libmysqlclient-dev mysql-client postgresql-client sqlite3 freetds-bin freetds-common freetds-dev cron --assume-yes --no-install-recommends && rm -rf /var/lib/apt/lists/*
Docker Pull Command
Owner
williamgkzhang

Comments (0)