Last active
September 21, 2019 01:36
-
-
Save gonssal/51a09222fd624bc54f4ffa482ba2d10c to your computer and use it in GitHub Desktop.
Ruby's Bundler Dockerfile
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
# This Dockerfile is aimed at building it from a directory containing a Gemfile. | |
# It installs the Gemfile packages and then gives you the "bundle exec" entry point. | |
# | |
# Usage: | |
# * docker build --tag=bundle-exec . | |
# * docker run -it --rm --user $(id -u):$(id -g) -v $(pwd):/src bundle-exec | |
# Example: docker run -it --rm --user $(id -u):$(id -g) -v $(pwd):/src bundle-exec compass compile -e production | |
FROM ubuntu:16.04 | |
RUN apt-get update && apt-get install -y bundler | |
# Buildtime | |
COPY Gemfile /tmp/Gemfile | |
RUN ["bundle", "install", "--gemfile=/tmp/Gemfile"] | |
# Runtime | |
VOLUME /src | |
WORKDIR /src | |
ENTRYPOINT ["bundle", "exec"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment