From 07eacbf63cef3059cae6b79e1e4f6cfb26c8f25e Mon Sep 17 00:00:00 2001 From: Alon Salant Date: Mon, 2 Dec 2019 14:37:55 -0800 Subject: [PATCH] Switch to building Docker image from ruby:1.9.3 so that we can specify MySQL 5.6. --- Dockerfile | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6e09c81..c397073 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,14 +3,29 @@ ########### # Password is test for greeter, sfbk, mechanic, scbc, cbi, admin -FROM bikebike/bikebike +FROM ruby:1.9.3 MAINTAINER Jonathan Rosenbaum +RUN apt-get update && apt-get install -y lsb-release git supervisor make + +# Install mysql 5.6 +# From https://www.debiantutorials.com/how-to-install-mysql-server-5-6-or-5-7/ +ENV DEBIAN_FRONTEND noninteractive +RUN wget https://dev.mysql.com/get/mysql-apt-config_0.8.9-1_all.deb +RUN echo mysql-apt-config mysql-apt-config/select-server select mysql-5.6 | debconf-set-selections +RUN echo mysql-community-server mysql-community-server/root-pass password '' | debconf-set-selections +RUN dpkg -i mysql-apt-config_0.8.9-1_all.deb +RUN dpkg-preconfigure mysql-community-server_version-and-platform-specific-part.deb +RUN apt-get update && apt-get install -y --force-yes mysql-community-server + +# Install freehub RUN git clone git://github.com/asalant/freehub.git RUN gem install bundler -v 1.15.4 -#RUN apt-get -y install ruby-dev RUN bundle install --gemfile=/freehub/Gemfile -RUN service mysql start; cd /freehub; rake db:create:all; rake db:migrate; rake db:fixtures:load + +# Bootstrap freehub +RUN chown -R mysql:mysql /var/lib/mysql /var/run/mysqld && service mysql start; \ + cd /freehub; rake db:create:all; rake db:migrate; rake db:fixtures:load COPY mysql.conf /etc/supervisor/conf.d/ COPY freehub.conf /etc/supervisor/conf.d/