-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
84 lines (63 loc) · 1.52 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
FROM ruby:3.0.0-alpine
ENV RAILS_MAX_THREADS 100
ENV RAILS_ENV production
ENV NODE_ENV production
ENV RAILS_SERVE_STATIC_FILES true
ENV RACK_TIMEOUT_SERVICE_TIMEOUT 60
ENV RAILS_LOG_TO_STDOUT true
ENV UID=8877
ENV GID=8877
RUN addgroup -g $GID -S detox
RUN adduser \
--disabled-password \
--gecos "" \
--home "/detox" \
--ingroup "detox" \
--no-create-home \
--uid "$UID" \
"detox"
RUN gem install bundler:2.1.4
RUN apk add --no-cache --update build-base \
postgresql-dev \
nodejs \
ffmpeg \
yarn \
ffmpeg \
tzdata \
imagemagick \
imagemagick6 \
imagemagick6-c++ \
imagemagick6-dev \
imagemagick6-libs \
build-base \
postgresql-client \
git \
&& rm -f /var/cache/apk/*
RUN convert --version
# 14.15.4
RUN node --version
RUN yarn --version
RUN mkdir -p /detox
WORKDIR /detox
COPY . /detox
RUN chown -R detox:detox /detox
ADD docker/supervisor/entrypoint.sh /
RUN chmod +x /entrypoint.sh
RUN chown detox:detox /entrypoint.sh
USER detox
WORKDIR /detox
RUN bundle config set without 'test development' \
&& bundle install --path=vendor/bundle \
&& rm -rf vendor/bundle/ruby/3.0.0/cache/*.gem \
&& find vendor/bundle/ruby/3.0.0/gems/ -name "*.c" -delete \
&& find vendor/bundle/ruby/3.0.0/gems/ -name "*.o" -delete
WORKDIR /detox/app/javascript/client
RUN yarn install \
&& yarn cache clean \
&& yarn autoclean --force
WORKDIR /detox
RUN mkdir -p tmp/pids
RUN mkdir -p tmp/cache
EXPOSE 4000
EXPOSE 4001
CMD ["/entrypoint.sh"]