-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
31 lines (23 loc) · 808 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
FROM ruby:2.6-alpine
RUN apk add --no-cache --update build-base \
ca-certificates \
linux-headers \
git \
postgresql-dev \
nodejs \
tzdata
RUN gem install bundler
ARG APP_ENV=""
ENV APP_ENV=$APP_ENV
ENV APP_PATH /opt/default_sinatra
WORKDIR $APP_PATH
ADD Gemfile $APP_PATH
ADD Gemfile.lock $APP_PATH
ADD .ruby-version $APP_PATH
ADD app_installer.sh /usr/bin/
RUN /usr/bin/app_installer.sh
COPY . $APP_PATH
RUN mv $APP_PATH/entrypoint.sh /usr/bin; chmod +x /usr/bin/entrypoint.sh
ENTRYPOINT ["/usr/bin/entrypoint.sh"]
EXPOSE 9292
CMD ["bundle", "exec", "rackup", "-o", "0.0.0.0", "-P", "tmp/pids/server.pid"]