Skip to content

Instantly share code, notes, and snippets.

@toanvv
Last active November 8, 2019 05:30
Show Gist options
  • Save toanvv/c3d0fb6abf4a280b401d6e694f11cc96 to your computer and use it in GitHub Desktop.
Save toanvv/c3d0fb6abf4a280b401d6e694f11cc96 to your computer and use it in GitHub Desktop.

Revisions

  1. toanvv revised this gist Nov 8, 2019. No changes.
  2. toanvv revised this gist Nov 8, 2019. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Dockerfile:test-systemd-c7
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    ROM centos:7
    FROM centos:7

    RUN yum install -y \
    ImageMagick \
  3. toanvv revised this gist Nov 8, 2019. 1 changed file with 52 additions and 29 deletions.
    81 changes: 52 additions & 29 deletions Dockerfile:test-systemd-c7
    Original file line number Diff line number Diff line change
    @@ -1,40 +1,63 @@
    FROM local/c7-systemd
    RUN yum update -y
    RUN yum install -y git \
    git-core \
    zlib \
    zlib-devel \
    gcc-c++ \
    patch \
    readline \
    readline-devel \
    libyaml-devel \
    libffi-devel \
    openssl-devel \
    make \
    bzip2 \
    ROM centos:7

    RUN yum install -y \
    ImageMagick \
    ImageMagick-devel \
    apr-devel \
    apr-util-devel \
    autoconf \
    automake \
    libtool \
    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 \
    httpd && \
    yum clean all && \
    systemctl enable httpd.service
    zlib \
    zlib-devel

    RUN cd ~ && \
    git clone git://github.com/sstephenson/rbenv.git .rbenv && \
    echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile && \
    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 && \
    git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build && \
    echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bash_profile && \
    source ~/.bash_profile && \
    rbenv install 2.0.0-p353 && \
    rbenv rehash && \
    rbenv global 2.0.0-p353

    EXPOSE 80
    CMD ["/usr/sbin/init"]
    # notice after install
    # passenger-install-apache2-module
    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"]
  4. toanvv created this gist Sep 25, 2019.
    40 changes: 40 additions & 0 deletions Dockerfile:test-systemd-c7
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,40 @@
    FROM local/c7-systemd
    RUN yum update -y
    RUN yum install -y git \
    git-core \
    zlib \
    zlib-devel \
    gcc-c++ \
    patch \
    readline \
    readline-devel \
    libyaml-devel \
    libffi-devel \
    openssl-devel \
    make \
    bzip2 \
    autoconf \
    automake \
    libtool \
    bison \
    curl \
    sqlite-devel \
    httpd && \
    yum clean all && \
    systemctl enable httpd.service

    RUN cd ~ && \
    git clone git://github.com/sstephenson/rbenv.git .rbenv && \
    echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile && \
    echo 'eval "$(rbenv init -)"' >> ~/.bash_profile && \
    git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build && \
    echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bash_profile && \
    source ~/.bash_profile && \
    rbenv install 2.0.0-p353 && \
    rbenv rehash && \
    rbenv global 2.0.0-p353

    EXPOSE 80
    CMD ["/usr/sbin/init"]
    # notice after install
    # passenger-install-apache2-module