summaryrefslogtreecommitdiff
path: root/vendor/Dockerfile/Ruby-alpine.Dockerfile
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/Dockerfile/Ruby-alpine.Dockerfile')
-rw-r--r--vendor/Dockerfile/Ruby-alpine.Dockerfile11
1 files changed, 7 insertions, 4 deletions
diff --git a/vendor/Dockerfile/Ruby-alpine.Dockerfile b/vendor/Dockerfile/Ruby-alpine.Dockerfile
index 9db4e2130f2..dffe9a65116 100644
--- a/vendor/Dockerfile/Ruby-alpine.Dockerfile
+++ b/vendor/Dockerfile/Ruby-alpine.Dockerfile
@@ -1,8 +1,8 @@
-FROM ruby:2.4-alpine
+FROM ruby:2.5-alpine
# Edit with nodejs, mysql-client, postgresql-client, sqlite3, etc. for your needs.
# Or delete entirely if not needed.
-RUN apk --no-cache add nodejs postgresql-client
+RUN apk --no-cache add nodejs postgresql-client tzdata
# throw errors if Gemfile has been modified since Gemfile.lock
RUN bundle config --global frozen 1
@@ -11,7 +11,10 @@ RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
COPY Gemfile Gemfile.lock /usr/src/app/
-RUN bundle install
+# Install build dependencies - required for gems with native dependencies
+RUN apk add --no-cache --virtual build-deps build-base postgresql-dev && \
+ bundle install && \
+ apk del build-deps
COPY . /usr/src/app
@@ -21,4 +24,4 @@ COPY . /usr/src/app
# For Rails
EXPOSE 3000
-CMD ["rails", "server"]
+CMD ["bundle", "exec", "rails", "server"]