FROM ubuntu:latest RUN apt-get update && apt-get install -y curl RUN curl -fsSL https://deb.nodesource.com/setup_lts.x | bash - RUN apt-get update && apt-get install -y ruby ruby-dev ruby-bundler \ build-essential zlib1g-dev libsqlite3-dev libxml2-dev libxslt1-dev pkg-config nodejs RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* RUN gem install bundler ENV DOCKERIZE_VERSION v0.6.1 RUN curl -sSLO https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz \ && tar -C /usr/local/bin -xzvf dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz \ && rm dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz RUN mkdir -p /app WORKDIR /tmp COPY Gemfile Gemfile COPY Gemfile.lock Gemfile.lock RUN bundle config build.nokogiri --use-system-libraries RUN bundle update RUN bundle install ADD . /app WORKDIR /app RUN npm install -g yarn sass COPY ./docker-entrypoint.sh / RUN chmod +x docker-entrypoint.sh EXPOSE 3000 ENTRYPOINT ["/docker-entrypoint.sh"] CMD ["rails", "server", "-b", "0.0.0.0"]