Skip to content

Instantly share code, notes, and snippets.

@hardywu
Created November 10, 2018 16:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hardywu/3c2090ef25119d8f436b5b814f32073d to your computer and use it in GitHub Desktop.
Save hardywu/3c2090ef25119d8f436b5b814f32073d to your computer and use it in GitHub Desktop.
Development Environment in Docker
FROM ubuntu:18.04
MAINTAINER Hardy Wu 'hardy0wu@gmail.com'
# Update APT mirrors
RUN sed -i 's/archive.ubuntu.com/mirrors.ustc.edu.cn/g' /etc/apt/sources.list
RUN apt-get update && apt-get install -y curl bash git gnupg zlib1g-dev sudo vim build-essential ruby ruby-dev ruby-bundler
RUN curl -sL https://deb.nodesource.com/setup_10.x | bash -
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get install -y nodejs tzdata yarn libmysqlclient-dev
RUN gem sources --add https://gems.ruby-china.com/ --remove https://rubygems.org/
RUN gem install bundler rake
RUN bundle config mirror.https://rubygems.org https://gems.ruby-china.com
RUN useradd -ms /bin/bash docker
RUN usermod -aG sudo docker
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
USER docker
ENTRYPOINT sleep infinity
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment