skill-assessment-app/Dockerfile

44 lines
1.2 KiB
Docker
Raw Normal View History

2016-07-26 10:38:00 -05:00
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 \
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 \
&& 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/*
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