Created
November 10, 2018 16:41
-
-
Save hardywu/3c2090ef25119d8f436b5b814f32073d to your computer and use it in GitHub Desktop.
Development Environment in Docker
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:18.04 | |
MAINTAINER Hardy Wu '[email protected]' | |
# 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