Last active
November 8, 2019 05:30
-
-
Save toanvv/c3d0fb6abf4a280b401d6e694f11cc96 to your computer and use it in GitHub Desktop.
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 centos:7 | |
| RUN yum install -y \ | |
| ImageMagick \ | |
| ImageMagick-devel \ | |
| apr-devel \ | |
| apr-util-devel \ | |
| autoconf \ | |
| automake \ | |
| bison \ | |
| bzip2 \ | |
| curl \ | |
| curl-devel \ | |
| gcc-c++ \ | |
| gcc-c++\ | |
| git-core \ | |
| httpd-devel \ | |
| libffi-devel \ | |
| libtool \ | |
| libyaml-devel \ | |
| make \ | |
| mysql \ | |
| mysql-devel \ | |
| mysql-lib \ | |
| openssl-devel \ | |
| openssl-devel\ | |
| patch \ | |
| readline \ | |
| readline-devel \ | |
| readline-devel\ | |
| sqlite-devel \ | |
| zlib \ | |
| zlib-devel | |
| ENV PATH=/root/.rbenv/shims:/root/.rbenv/bin:$HOME/.rbenv/plugins/ruby-build/bin:$PATH | |
| RUN git clone git://github.com/sstephenson/rbenv.git /root/.rbenv && \ | |
| git clone git://github.com/sstephenson/ruby-build.git /root/.rbenv/plugins/ruby-build && \ | |
| echo 'eval "$(rbenv init -)"' >> ~/.bash_profile && \ | |
| rbenv install 2.0.0-p353 && \ | |
| rbenv rehash && \ | |
| rbenv global 2.0.0-p353 | |
| RUN source /root/.bash_profile && \ | |
| gem i rubygems-update -v '<3' && \ | |
| gem i rack -v '1.5.2' && \ | |
| gem i passenger -v '4.0.45' && \ | |
| gem i bundler -v '1.6.3' && \ | |
| rbenv rehash | |
| RUN mkdir /var/www/mistyline | |
| COPY ./Gemfile /var/www/mistyline/Gemfile | |
| COPY ./Gemfile.lock /var/www/mistyline/Gemfile.lock | |
| RUN source /root/.bash_profile && cd /var/www/mistyline && bundle install | |
| RUN chmod o+x /root && \ | |
| mkdir /var/www/mistyline/{tmp, log} && \ | |
| chmod o+rw -R /var/www/mistyline && \ | |
| passenger-install-apache2-module --auto | |
| WORKDIR /var/www/mistyline | |
| CMD ["/usr/sbin/httpd", "-D" ,"FORGROUND"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment