Skip to content

Instantly share code, notes, and snippets.

@iagopiimenta
Created May 31, 2017 15:38
Show Gist options
  • Save iagopiimenta/d522fb2aa53b90597924488c070597ac to your computer and use it in GitHub Desktop.
Save iagopiimenta/d522fb2aa53b90597924488c070597ac to your computer and use it in GitHub Desktop.
Dockerfile: Ruby 2.3.3 + nodejs + yarn + locales en_US.UTF-8
FROM ruby:2.3.3
# change this to force update node minor and patch version
ENV NODE_DATE_INSTALL 20170519
# change this to update node major version
RUN curl -sL https://deb.nodesource.com/setup_7.x | bash -
RUN apt-get update &&\
# add support to unicode chars from keyboard: ç,ã,ô:
apt-get install -y locales \
nodejs &&\
echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && /usr/sbin/locale-gen &&\
rm -rf /var/lib/apt/lists/*
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US.UTF-8
ENV LC_ALL en_US.UTF-8
ENV APP_ROOT /app
RUN mkdir $APP_ROOT
WORKDIR $APP_ROOT
RUN groupadd -r app &&\
groupmod -g 1000 app &&\
useradd -g app -ms /bin/bash app &&\
chown -R app:app $APP_ROOT
USER app
RUN curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 0.24.5
ENV PATH $PATH:$HOME/.yarn/bin:$PATH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment