2016-07-26 10:38:00 -05:00
|
|
|
FROM mysql:5.7
|
|
|
|
MAINTAINER Mark Moser <markamoser@gmail.com>
|
|
|
|
|
|
|
|
WORKDIR ~/
|
|
|
|
|
2016-07-27 11:17:50 -05:00
|
|
|
ENV MYSQL_ROOT_PASSWORD=root
|
2016-07-26 10:38:00 -05:00
|
|
|
ENV BUILD_PACKAGES="build-essential libmysqlclient-dev openssl graphviz nodejs curl wget zlib1g-dev tmux"
|
|
|
|
|
|
|
|
RUN apt-get update \
|
|
|
|
&& apt-get install --fix-missing -y $BUILD_PACKAGES \
|
|
|
|
&& /usr/sbin/mysqld --initialize --user=mysql \
|
2016-07-26 13:50:35 -05:00
|
|
|
&& service mysql start \
|
2016-07-26 10:38:00 -05:00
|
|
|
&& echo 'gem: --no-document' >> ~/.gemrc \
|
|
|
|
&& cp ~/.gemrc /etc/gemrc \
|
|
|
|
&& chmod uog+r /etc/gemrc \
|
|
|
|
&& mkdir -p /usr/app \
|
|
|
|
&& ln -s /usr/bin/nodejs /usr/bin/node \
|
|
|
|
&& echo "alias ll='ls -Ahl'" >> /root/.bashrc \
|
2016-07-26 17:00:00 -05:00
|
|
|
&& echo "alias la='ls -ahl'" >> /root/.bashrc \
|
|
|
|
&& echo "export HISTCONTROL=ignoredups" >> /root/.bashrc
|
2016-07-26 10:38:00 -05:00
|
|
|
|
|
|
|
# install current Ruby
|
|
|
|
RUN curl -L --progress https://github.com/postmodern/ruby-install/archive/v0.6.0.tar.gz | tar xz \
|
|
|
|
&& cd ruby-install-0.6.0 \
|
|
|
|
&& make install \
|
|
|
|
&& cd ../ \
|
|
|
|
&& ruby-install --system ruby \
|
|
|
|
&& gem install bundler
|
|
|
|
|
|
|
|
COPY .tmux.conf /root/
|
|
|
|
COPY Gemfile* /root/
|
|
|
|
RUN cd /root \
|
|
|
|
&& bundle install \
|
|
|
|
&& apt-get clean \
|
|
|
|
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
|
|
|
|
2016-07-26 13:50:35 -05:00
|
|
|
EXPOSE 3000 3306 35729
|
2016-07-26 10:38:00 -05:00
|
|
|
WORKDIR /usr/app
|
|
|
|
CMD ["mysqld"]
|
|
|
|
|
|
|
|
# ./start-docker.sh
|
|
|
|
# ./start-server.sh
|
|
|
|
# rails server -b 0.0.0.0
|