2023-10-17 12:59:37 -07:00
|
|
|
FROM ruby:3.2
|
2020-04-18 16:17:37 -07:00
|
|
|
|
2020-12-24 16:18:48 -08:00
|
|
|
USER root
|
|
|
|
|
|
|
|
ARG UID=1000
|
|
|
|
ARG GID=1000
|
|
|
|
|
2020-12-24 14:27:34 -08:00
|
|
|
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
|
|
|
|
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
|
|
|
|
|
2023-10-15 04:13:52 -07:00
|
|
|
RUN curl -sL https://deb.nodesource.com/setup_16.x | bash -
|
2020-04-18 16:17:37 -07:00
|
|
|
|
2020-05-09 01:36:00 -07:00
|
|
|
RUN apt-get update -qq \
|
|
|
|
&& apt-get install -y --no-install-recommends build-essential \
|
2021-12-25 05:23:42 -08:00
|
|
|
libpq-dev postgresql-client \
|
2020-05-09 01:16:30 -07:00
|
|
|
libxml2-dev libxslt1-dev \
|
|
|
|
libmagickwand-dev imagemagick \
|
2021-12-25 05:23:42 -08:00
|
|
|
libidn11-dev \
|
2020-05-09 01:36:00 -07:00
|
|
|
nodejs \
|
2020-12-24 14:27:34 -08:00
|
|
|
yarn \
|
2020-05-09 01:36:00 -07:00
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
2020-04-18 16:17:37 -07:00
|
|
|
|
2020-12-24 16:18:48 -08:00
|
|
|
RUN mkdir /app \
|
|
|
|
&& mkdir /cache
|
2020-05-09 01:16:30 -07:00
|
|
|
WORKDIR /app
|
2020-04-18 16:17:37 -07:00
|
|
|
|
2020-12-24 16:18:48 -08:00
|
|
|
RUN addgroup --gid ${GID} app \
|
|
|
|
&& adduser --gecos "" --disabled-password --shell /bin/bash --uid ${UID} --gid ${GID} app \
|
|
|
|
&& chown "${UID}:${GID}" -R /app/ \
|
|
|
|
&& chown "${UID}:${GID}" -R /cache/
|
|
|
|
|
|
|
|
COPY .docker/entrypoint.sh /usr/bin/
|
|
|
|
RUN chmod +x /usr/bin/entrypoint.sh
|
|
|
|
|
|
|
|
USER app:app
|
|
|
|
|
2020-05-09 01:16:30 -07:00
|
|
|
ADD Gemfile* /app/
|
2020-10-03 03:48:56 -07:00
|
|
|
RUN bundle install --jobs=$(nproc)
|
2020-10-20 02:47:00 -07:00
|
|
|
RUN gem install ruby-debug-ide
|
2020-12-24 14:27:34 -08:00
|
|
|
|
|
|
|
ADD package.json /app/
|
|
|
|
ADD yarn.lock /app/
|
|
|
|
RUN yarn install
|
|
|
|
|
2020-05-09 01:16:30 -07:00
|
|
|
COPY . /app
|
2020-04-18 16:17:37 -07:00
|
|
|
|
2020-05-09 01:16:30 -07:00
|
|
|
ENTRYPOINT ["entrypoint.sh"]
|
2020-04-19 05:59:50 -07:00
|
|
|
EXPOSE 3000
|
2020-05-09 01:16:30 -07:00
|
|
|
|
2022-11-06 04:20:14 -08:00
|
|
|
CMD ["rails", "server", "-b", "0.0.0.0"]
|