seven1m / bible_api

Ruby web app that serves JSON API for open and public domain bibles
https://bible-api.com
MIT License
538 stars 101 forks source link

Description to run this on docker #102

Closed nwaughachukwuma closed 3 months ago

nwaughachukwuma commented 3 months ago

What's the best way to run this on Docker? Can you specify what the Dockerfile should look like? I've tried running from an ubuntu base image but it keeps terminating with an error for version mismatch of ruby instance and other times issue with installing MySQL server

# Use the official Ubuntu image as the base
FROM ubuntu:latest

# Install MySQL Server
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y mysql-server

# Install dependencies
RUN apt-get update && apt-get install -y git curl build-essential mysql-client redis-server

RUN apt-get install -y ruby-full=3.2.3

# Clone the repo
RUN git clone https://github.com/seven1m/bible_api
WORKDIR /bible_api
RUN git submodule update --init

# Install Ruby dependencies
RUN gem install bundler
RUN bundle config --local deployment true
RUN bundle install

...
seven1m commented 3 months ago

I'm sorry, but I cannot help with this. I'm not very good at Docker myself. 😄