-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathDockerfile
44 lines (37 loc) · 1.19 KB
/
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
# uses the specified ruby version - i'm just going from the version in the germfile, so if that changes, this should change
FROM ruby:3.0.0-alpine
ENV APP_PATH /var/app
ENV BUNDLER_VERSION 2.2.17
ENV BUNDLE_PATH /usr/local/bundle/gems
ENV TEMP_PATH /tmp/
ENV RAILS_LOG_TO_STDOUT true
ENV RAILS_PORT 3000
ENV RAILS_DB host.docker.internal
COPY ./entrypoints/dev-docker-entrypoint.sh /usr/local/bin/dev-entrypoint.sh
COPY ./entrypoints/test-docker-entrypoint.sh /usr/local/bin/test-entrypoint.sh
COPY ./entrypoints/webpacker-docker-entrypoint.sh /usr/local/bin/webpacker-entrypoint.sh
RUN chmod +x /usr/local/bin/dev-entrypoint.sh && chmod +x /usr/local/bin/test-entrypoint.sh && chmod +x /usr/local/bin/webpacker-entrypoint.sh
# setup dependencies for rails
RUN apk -U add --no-cache \
build-base \
git \
postgresql-dev \
postgresql-client \
libxml2-dev \
libxslt-dev \
nodejs \
yarn \
imagemagick \
tzdata \
less \
sqlite-dev \
&& rm -rf /var/cache/apk* \
&& mkdir -p $APP_PATH
RUN gem install bundler --version 2.2.0 \
&& rm -rf $GEM_HOME/cache/*
WORKDIR $APP_PATH
EXPOSE $RAILS_PORT
EXPOSE 3035
EXPOSE 4444
EXPOSE 5900
ENTRYPOINT ["bundle", "exec"]