Created
December 24, 2022 19:27
-
-
Save amitk/602a40f1be162b612a1ebb88f387dc79 to your computer and use it in GitHub Desktop.
Docker file to create a rails application with ruby slim image
This file contains hidden or 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
FROM ruby:3.1.1-slim | |
WORKDIR /usr/src/app | |
RUN apt-get update && \ | |
apt-get install ruby-full build-essential -y && \ | |
apt-get install libpq-dev -y | |
COPY . . | |
RUN gem update --system | |
RUN bundle install | |
RUN if [ -f tmp/pids/server.pid ]; then rm tmp/pids/server.pid; fi | |
EXPOSE 3000 | |
ENTRYPOINT ["rails", "server", "-b", "0.0.0.0"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment