Docker config
This commit is contained in:
42
Dockerfile
Normal file
42
Dockerfile
Normal file
@ -0,0 +1,42 @@
|
||||
FROM mysql:5.7
|
||||
MAINTAINER Mark Moser <markamoser@gmail.com>
|
||||
|
||||
WORKDIR ~/
|
||||
|
||||
ENV MYSQL_ALLOW_EMPTY_PASSWORD=yes
|
||||
ENV MYSQL_ROOT_PASSWORD=
|
||||
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 \
|
||||
&& 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 \
|
||||
&& echo "alias la='ls -ahl'" >> /root/.bashrc
|
||||
|
||||
# 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/*
|
||||
|
||||
EXPOSE 3000 3306
|
||||
WORKDIR /usr/app
|
||||
CMD ["mysqld"]
|
||||
|
||||
# ./start-docker.sh
|
||||
# ./start-server.sh
|
||||
# rails server -b 0.0.0.0
|
Reference in New Issue
Block a user