-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
50 lines (40 loc) · 994 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
43
44
45
46
47
48
49
50
FROM ruby:3.3.5-alpine
ENV APP_PATH /var/app \
BUNDLE_VERSION 2.3.9 \
BUNDLE_PATH /usr/local/bundle/gems \
TMP_PATH /tmp \
RAILS_LOG_TO_STDOUT true \
RAILS_PORT 3000
RUN apk add --update tzdata && \
cp /usr/share/zoneinfo/Europe/London /etc/localtime && \
echo "Europe/London" > /etc/timezone
RUN apk add --update --virtual runtime-deps \
postgresql-client \
nodejs \
# libffi-dev \
# readline \
# sqlite \
&& rm -rf /var/cache/apk/* \
&& mkdir -p $APP_PATH
WORKDIR $TMP_PATH
ADD Gemfile* ./
RUN gem install bundler -- "$BUNDLE_VERSION" \
&& rm -rf $GEM_HOME/cache/*
RUN apk add --virtual build-deps \
build-base \
# openssl-dev \
postgresql-dev \
# libc-dev \
# linux-headers \
# libxml2-dev \
# libxslt-dev \
# readline-dev \
&& bundle install \
&& apk del build-deps
ENV APP_HOME /app
COPY . $APP_HOME
WORKDIR $APP_HOME
ENV RAILS_ENV=development \
RACK_ENV=development
EXPOSE $RAILS_PORT
CMD ["rails", "server", "-b", "0.0.0.0"]