2020-08-11 01:20:52 +08:00
|
|
|
# GENERATED FILE, DO NOT MODIFY!
|
|
|
|
# To update this file please edit the relevant template and run the generation
|
|
|
|
# task `build/dockerfile_writer.rb --env development --compose-file docker-compose.yml,docker-compose.override.yml --in build/Dockerfile.template --out Dockerfile`
|
|
|
|
|
2021-07-13 21:34:50 +08:00
|
|
|
ARG RUBY=2.7
|
2020-08-06 23:29:46 +08:00
|
|
|
|
2020-10-22 07:45:32 +08:00
|
|
|
FROM instructure/ruby-passenger:$RUBY
|
2020-08-06 23:29:46 +08:00
|
|
|
LABEL maintainer="Instructure"
|
|
|
|
|
2020-09-10 07:44:21 +08:00
|
|
|
ARG POSTGRES_CLIENT=12
|
2020-08-06 23:29:46 +08:00
|
|
|
ENV APP_HOME /usr/src/app/
|
2021-06-30 23:23:44 +08:00
|
|
|
ENV RAILS_ENV development
|
2020-09-10 07:44:21 +08:00
|
|
|
ENV NGINX_MAX_UPLOAD_SIZE 10g
|
2020-08-06 23:29:46 +08:00
|
|
|
ENV LANG en_US.UTF-8
|
|
|
|
ENV LANGUAGE en_US.UTF-8
|
|
|
|
ENV LC_CTYPE en_US.UTF-8
|
|
|
|
ENV LC_ALL en_US.UTF-8
|
2021-01-28 04:46:09 +08:00
|
|
|
ARG CANVAS_RAILS6_0=1
|
2020-11-10 23:02:55 +08:00
|
|
|
ENV CANVAS_RAILS6_0=${CANVAS_RAILS6_0}
|
2020-08-06 23:29:46 +08:00
|
|
|
|
2020-09-10 07:44:21 +08:00
|
|
|
ENV YARN_VERSION 1.19.1-1
|
2021-05-25 05:44:17 +08:00
|
|
|
ENV BUNDLER_VERSION 2.2.17
|
2020-09-10 07:44:21 +08:00
|
|
|
ENV GEM_HOME /home/docker/.gem/$RUBY
|
2020-08-06 23:29:46 +08:00
|
|
|
ENV PATH $GEM_HOME/bin:$PATH
|
|
|
|
ENV BUNDLE_APP_CONFIG /home/docker/.bundle
|
|
|
|
|
2020-10-09 02:50:27 +08:00
|
|
|
WORKDIR $APP_HOME
|
|
|
|
|
2020-08-06 23:29:46 +08:00
|
|
|
USER root
|
2020-11-06 05:12:42 +08:00
|
|
|
|
|
|
|
ARG USER_ID
|
|
|
|
# This step allows docker to write files to a host-mounted volume with the correct user permissions.
|
|
|
|
# Without it, some linux distributions are unable to write at all to the host mounted volume.
|
|
|
|
RUN if [ -n "$USER_ID" ]; then usermod -u "${USER_ID}" docker \
|
|
|
|
&& chown --from=9999 docker /usr/src/nginx /usr/src/app -R; fi
|
|
|
|
|
2021-01-26 03:16:32 +08:00
|
|
|
RUN curl -sL https://deb.nodesource.com/setup_14.x | bash - \
|
2020-09-10 07:44:21 +08:00
|
|
|
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \
|
|
|
|
&& echo "deb https://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list \
|
|
|
|
&& printf 'path-exclude /usr/share/doc/*\npath-exclude /usr/share/man/*' > /etc/dpkg/dpkg.cfg.d/01_nodoc \
|
|
|
|
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list \
|
|
|
|
&& curl -sS https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - \
|
|
|
|
&& apt-get update -qq \
|
|
|
|
&& apt-get install -qqy --no-install-recommends \
|
|
|
|
nodejs \
|
|
|
|
yarn="$YARN_VERSION" \
|
|
|
|
libxmlsec1-dev \
|
|
|
|
python-lxml \
|
2022-01-14 06:11:01 +08:00
|
|
|
python3-lxml \
|
2020-09-10 07:44:21 +08:00
|
|
|
libicu-dev \
|
|
|
|
parallel \
|
|
|
|
postgresql-client-$POSTGRES_CLIENT \
|
|
|
|
unzip \
|
|
|
|
pbzip2 \
|
|
|
|
fontforge \
|
2021-06-12 00:42:24 +08:00
|
|
|
git \
|
|
|
|
build-essential \
|
|
|
|
python2 \
|
2021-07-13 21:34:50 +08:00
|
|
|
python-is-python2 \
|
2020-09-10 07:44:21 +08:00
|
|
|
&& rm -rf /var/lib/apt/lists/* \
|
|
|
|
&& mkdir -p /home/docker/.gem/ruby/$RUBY_MAJOR.0
|
2021-04-06 04:46:04 +08:00
|
|
|
|
2020-09-10 07:44:21 +08:00
|
|
|
RUN if [ -e /var/lib/gems/$RUBY_MAJOR.0/gems/bundler-* ]; then BUNDLER_INSTALL="-i /var/lib/gems/$RUBY_MAJOR.0"; fi \
|
|
|
|
&& gem uninstall --all --ignore-dependencies --force $BUNDLER_INSTALL bundler \
|
2021-02-20 01:12:45 +08:00
|
|
|
&& gem install bundler --no-document -v $BUNDLER_VERSION \
|
2020-09-10 07:44:21 +08:00
|
|
|
&& find $GEM_HOME ! -user docker | xargs chown docker:docker
|
2021-03-02 02:42:47 +08:00
|
|
|
RUN npm install -g npm@latest && npm cache clean --force
|
2020-08-06 23:29:46 +08:00
|
|
|
|
|
|
|
USER docker
|
2020-10-09 02:50:27 +08:00
|
|
|
|
2020-03-16 20:23:58 +08:00
|
|
|
RUN set -eux; \
|
2021-06-29 05:41:08 +08:00
|
|
|
mkdir -p \
|
|
|
|
.yardoc \
|
|
|
|
app/stylesheets/brandable_css_brands \
|
|
|
|
app/views/info \
|
|
|
|
config/locales/generated \
|
|
|
|
gems/canvas_i18nliner/node_modules \
|
|
|
|
log \
|
|
|
|
node_modules \
|
|
|
|
packages/canvas-media/es \
|
|
|
|
packages/canvas-media/lib \
|
|
|
|
packages/canvas-media/node_modules \
|
|
|
|
packages/canvas-planner/lib \
|
|
|
|
packages/canvas-planner/node_modules \
|
|
|
|
packages/canvas-rce/canvas \
|
|
|
|
packages/canvas-rce/lib \
|
|
|
|
packages/canvas-rce/node_modules \
|
|
|
|
packages/jest-moxios-utils/node_modules \
|
|
|
|
packages/js-utils/es \
|
|
|
|
packages/js-utils/lib \
|
|
|
|
packages/js-utils/node_modules \
|
|
|
|
packages/k5uploader/es \
|
|
|
|
packages/k5uploader/lib \
|
|
|
|
packages/k5uploader/node_modules \
|
|
|
|
packages/old-copy-of-react-14-that-is-just-here-so-if-analytics-is-checked-out-it-doesnt-change-yarn.lock/node_modules \
|
|
|
|
pacts \
|
|
|
|
public/dist \
|
|
|
|
public/doc/api \
|
|
|
|
public/javascripts/translations \
|
|
|
|
reports \
|
|
|
|
tmp \
|
2021-12-15 02:00:31 +08:00
|
|
|
/home/docker/.bundle/ \
|
2021-06-29 05:41:08 +08:00
|
|
|
/home/docker/.cache/yarn \
|
|
|
|
/home/docker/.gem/
|