-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
executable file
·42 lines (34 loc) · 996 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
40
41
42
FROM ruby:2.4.0-alpine
LABEL \
io.voxbox.build-date=${BUILD_DATE} \
io.voxbox.name=t2-airtime \
io.voxbox.vendor=voxbox.io \
io.voxbox.vcs-url=https://github.com/matteolc/docker-t2-airtime.git \
io.voxbox.vcs-ref=${VCS_REF} \
io.voxbox.license=MIT
ARG APP_NAME
ARG T2_SHOP_USER
ARG T2_AIRTIME_KEY
ENV APP_HOME=app \
APP_NAME=${APP_NAME:-app} \
RAILS_ENV=production
COPY app/ /${APP_NAME}/
WORKDIR ${APP_NAME}
RUN apk update && \
apk add --no-cache \
build-base && \
gem install \
bundler --no-rdoc --no-ri && \
gem install \
rails --no-rdoc --no-ri && \
bundle install \
--without development test --deployment -j20 && \
apk del \
build-base
ENV T2_SHOP_USER=${T2_SHOP_USER} \
T2_AIRTIME_KEY=${T2_AIRTIME_KEY} \
CORS_ORIGIN=*
RUN bundle exec rake secret | awk '{print "SECRET_KEY_BASE="$1}' >> .env
EXPOSE 3000/tcp
CMD bundle exec puma