Skip to content

Instantly share code, notes, and snippets.

@wshihadeh
Last active February 10, 2020 22:15
Show Gist options
  • Save wshihadeh/7b8b5654001343dbc7c44214ce49b4c7 to your computer and use it in GitHub Desktop.
Save wshihadeh/7b8b5654001343dbc7c44214ce49b4c7 to your computer and use it in GitHub Desktop.
Dockerfiles
FROM wshihadeh/rails-base-image-ruby:2.6.5-mysql
LABEL maintainer="Al-waleed Shihadeh <[email protected]>"
COPY ./docker-entrypoint.sh /
ENTRYPOINT ["/docker-entrypoint.sh"]
USER rails
WORKDIR /application
RUN bundle config build.nokogiri --use-system-libraries && \
bundle config git.allow_insecure true && \
bundle config set deployment 'true' && \
bundle config set frozen 'true' && \
bundle config set without 'development test' && \
bundle install --quiet && \
bundle exec rake assets:precompile && \
mkdir tmp/pids && \
rm -rf vendor/cache/*.gem
CMD web
FROM wshihadeh/rails_blog:master
From nginx:latest
LABEL maintainer="Al-waleed <[email protected]>"
COPY ./docker-entrypoint.sh /
ENTRYPOINT ["/docker-entrypoint.sh"]
COPY ./default.conf /etc/nginx/conf.d/default.conf
COPY ./nginx.conf /etc/nginx/nginx.conf
RUN mkdir /var/www/
WORKDIR /var/www/
COPY --from=0 /application/public public/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment