jam-cloud/Dockerfile

49 lines
1.4 KiB
Docker
Raw Normal View History

2022-01-27 17:44:34 +00:00
FROM ubuntu:latest
# update apt cache and install dependencies
2022-01-27 17:44:34 +00:00
RUN apt-get update && apt-get install git curl build-essential libssl-dev libreadline-dev zlib1g-dev sqlite3 libsqlite3-dev -y
RUN echo "deb http://security.ubuntu.com/ubuntu bionic-security main" >> /etc/apt/sources.list
RUN apt update && apt-cache policy libssl1.0-dev
RUN apt install -y libssl1.0-dev libpq-dev
2022-02-03 17:44:13 +00:00
2022-01-27 17:44:34 +00:00
# add app user
#RUN adduser --gecos '' --disabled-password app
# set user to app
#USER app
# set rbenv, ruby-build bin paths
ENV HOME /root
ENV PATH $HOME/.rbenv/shims:$HOME/.rbenv/bin:$HOME/.rbenv/plugins/ruby-build/bin:$PATH
# clone rbenv
RUN git clone https://github.com/sstephenson/rbenv.git ~/.rbenv
2022-01-27 17:44:34 +00:00
# clone ruby-build
RUN git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
2022-01-27 17:44:34 +00:00
# set working directory to project src
WORKDIR /src
# add Gemfile, Gemfile.lock, .ruby-version to docker
# ADD Gemfile Gemfile.lock .ruby-version ./
# install ruby
2022-01-27 17:44:34 +00:00
RUN rbenv install 2.3.3
RUN rbenv global 2.3.3
# install bundler
RUN gem install bundler -v "< 2.0"
RUN gem install rspec
RUN gem install rack-cors -v ">=1.0.6"
WORKDIR /app
2022-01-27 17:44:34 +00:00
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get install -y protobuf-compiler pkg-config make g++
RUN apt-get install -y gcc libxslt-dev libxml2-dev zlib1g-dev libpq-dev
RUN apt install -y postgresql
RUN /etc/init.d/postgresql start
2022-02-03 17:44:13 +00:00
RUN apt install -y nodejs
ENV AWS_KEY="AAAA"
ENV AWS_SECRET="XXXX"
ADD . /app
2022-01-27 17:44:34 +00:00
RUN /app/build