This will build the base image needed to run any rails app that uses
Create a Dockerfile with the following content
Development version
FROM pixalar/ruby:latest
RUN apk --no-cache add \
build-base \
libxml2-dev \
libxslt-dev \
postgresql-dev \
git
WORKDIR /usr/src/app
VOLUME /usr/src/app
EXPOSE 3000
CMD ["bin/rails", "s", "-b", "0.0.0.0"]
Production version
FROM pixalar/ruby:latest
RUN apk --no-cache add --virtual .build-dependencies \
build-base \
libxml2-dev \
libxslt-dev \
postgresql-dev \
git
COPY . /usr/src/app
RUN bundle install --system --jobs=4 --no-cache --without development test --clean \
&& apk del .build-dependencies
Once you've added the docker file you can build the base image of your app using
Content type
Image
Digest
Size
61.1 MB
Last updated
almost 9 years ago
docker pull pixalar/ruby