-
-
Notifications
You must be signed in to change notification settings - Fork 396
/
Dockerfile
52 lines (39 loc) · 1.5 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
FROM ruby:3.3.6
ENV RACK_ENV=production
ENV RAILS_ENV=production
ENV PORT=8080
ENV BUNDLER_VERSION=2.3.25
EXPOSE 8080
SHELL ["/bin/bash", "-c"]
WORKDIR /app
ADD Gemfile Gemfile.lock /app/
RUN gem install bundler:$BUNDLER_VERSION && bundle install
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
supervisor locales nodejs vim nano \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN DEBIAN_FRONTEND=noninteractive dpkg-reconfigure locales \
&& locale-gen C.UTF-8 \
&& /usr/sbin/update-locale LANG=C.UTF-8
ENV LC_ALL=C.UTF-8
ARG TARGETARCH
ENV SUPERCRONIC_URL=https://github.com/aptible/supercronic/releases/download/v0.1.3/supercronic-linux-$TARGETARCH \
SUPERCRONIC=supercronic-linux-$TARGETARCH \
SUPERCRONIC_amd64_SHA1SUM=96960ba3207756bb01e6892c978264e5362e117e \
SUPERCRONIC_arm_SHA1SUM=8c1e7af256ee35a9fcaf19c6a22aa59a8ccc03ef \
SUPERCRONIC_arm64_SHA1SUM=f0e8049f3aa8e24ec43e76955a81b76e90c02270 \
SUPERCRONIC_SHA1SUM="SUPERCRONIC_${TARGETARCH}_SHA1SUM"
RUN curl -fsSLO "$SUPERCRONIC_URL" \
&& echo "${!SUPERCRONIC_SHA1SUM} ${SUPERCRONIC}" | sha1sum -c - \
&& chmod +x "$SUPERCRONIC" \
&& mv "$SUPERCRONIC" "/usr/local/bin/${SUPERCRONIC}" \
&& ln -s "/usr/local/bin/${SUPERCRONIC}" /usr/local/bin/supercronic
ADD docker/supervisord.conf /etc/supervisord.conf
ADD docker/start.sh /app/
ADD . /app
RUN useradd -m stringer
RUN chown -R stringer:stringer /app
USER stringer
ENV RAILS_SERVE_STATIC_FILES=true
CMD /app/start.sh