Skip to content

Commit

Permalink
Build ohcount for Ubuntu 22.04 (#87)
Browse files Browse the repository at this point in the history
OTWO-6971
  • Loading branch information
notalex committed Apr 13, 2023
1 parent 93258e8 commit 736a750
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions Dockerfile
@@ -1,17 +1,23 @@
FROM ubuntu:18.04
FROM ubuntu:22.04

ENV APP_HOME /var/local/ohcount
ENV RBENV_PATH /usr/local/rbenv

RUN apt-get update \
&& apt-get install -y ruby ruby-dev git libpcre3 libpcre3-dev libmagic-dev gperf gcc ragel swig \
&& cp /usr/include/x86_64-linux-gnu/ruby-2.5.0/ruby/config.h /usr/include/ruby-2.5.0/ruby/
&& apt-get install -y git libpcre3 libpcre3-dev libmagic-dev gperf gcc ragel swig software-properties-common

# RUN mkdir -p /var/local/repos
# RUN apt-get install -y vim-tiny ranger
RUN apt-get install -y curl make zlib1g-dev bzip2 libreadline-dev # ruby build dependencies.
RUN git clone https://github.com/rbenv/rbenv.git $RBENV_PATH \
&& git clone https://github.com/sstephenson/ruby-build.git $RBENV_PATH/plugins/ruby-build \
&& echo 'export PATH="/usr/local/rbenv/shims:/usr/local/rbenv/bin:/usr/local/rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bashrc \
&& echo 'eval "$(rbenv init -)"' >> ~/.bashrc \
&& . ~/.bashrc \
&& rbenv install 2.6.9 && rbenv global 2.6.9 \
&& rbenv rehash

RUN mkdir -p $APP_HOME
COPY . $APP_HOME

RUN cd $APP_HOME && ./build
RUN cd $APP_HOME && . ~/.bashrc && ./build

WORKDIR $APP_HOME

0 comments on commit 736a750

Please sign in to comment.