forked from korsakov/ohcount
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Build ohcount for Ubuntu 22.04 (#87)
OTWO-6971
- Loading branch information
Showing
1 changed file
with
12 additions
and
6 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |