forked from klausmeyer/docker-registry-browser
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
39 lines (28 loc) · 832 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
FROM ruby:2.6.5-alpine
MAINTAINER Klaus Meyer <[email protected]>
ARG SOURCE_COMMIT
ENV SOURCE_COMMIT $SOURCE_COMMIT
ENV PORT 8080
ENV SSL_PORT 8443
ENV RAILS_ENV production
ENV SECRET_KEY_BASE changeme
ENV RAILS_SERVE_STATIC_FILES true
ENV RAILS_LOG_TO_STDOUT true
EXPOSE $PORT
EXPOSE $SSL_PORT
WORKDIR /app
RUN apk update \
&& apk add build-base zlib-dev tzdata nodejs yarn openssl-dev \
&& rm -rf /var/cache/apk/*
COPY Gemfile Gemfile.lock ./
RUN gem install bundler \
&& bundle config --local build.sassc --disable-march-tune-native \
&& bundle install --without development test
COPY . .
RUN bundle exec rake assets:precompile \
&& addgroup -S app && adduser -S app -G app -h /app \
&& chown -R app.app /app \
&& chown -R app.app /usr/local/bundle \
&& apk del build-base yarn
USER app
CMD puma -C config/puma.rb