@@ -4,46 +4,62 @@ FROM composer:2.5.1 as composer
44
55FROM php:7.4.12-apache AS prod
66
7- RUN (curl -sL https://deb.nodesource.com/setup_19.x | bash) \
8- && apt-get update \
7+ RUN apt-get update \
98 && apt-get install -y --no-install-recommends \
109 git=1:2.20.1-2+deb10u7 \
1110 libghc-gnuidn-dev=0.2.2-7+b1 \
1211 locales=2.28-10+deb10u2 \
13- nodejs=19.6.0-deb-1nodesource1 \
1412 perl=5.28.1-6+deb10u1 \
1513 python3=3.7.3-1 \
1614 python3-pip=18.1-5 \
17- ruby-full=1:2.5.1 \
1815 unzip=6.0-23+deb10u3 \
1916 zlib1g-dev=1:1.2.11.dfsg-1+deb10u2 \
2017 && pip3 install docutils==0.14 \
21- && gem install bundler -v 2.3.26 \
2218 && rm -rf /var/lib/apt/lists/* \
2319 && python3 --version \
24- && ruby --version \
25- && bundle config set no-cache 'true' \
2620 && echo en_US.UTF-8 UTF-8 > /etc/locale.gen \
2721 && locale-gen \
2822 && locale -a
2923
3024ENV LANG=en_US.UTF-8
3125ENV PATH /var/www/node_modules/.bin:$PATH
26+ COPY package* /var/www/
27+
28+ RUN (curl -sL https://deb.nodesource.com/setup_19.x | bash) \
29+ && apt-get update \
30+ && apt-get install -y --no-install-recommends \
31+ nodejs=19.6.0-deb-1nodesource1 \
32+ && rm -rf /var/lib/apt/lists/* \
33+ && npm install
34+
35+ COPY Gemfile* /var/www/
36+
37+ RUN apt-get update \
38+ && apt-get install -y --no-install-recommends \
39+ libssl-dev \
40+ libyaml-dev \
41+ && rm -rf /var/lib/apt/lists/* \
42+ && curl -fsSL https://github.com/rbenv/rbenv-installer/raw/HEAD/bin/rbenv-installer | bash \
43+ && eval "$(~/.rbenv/bin/rbenv init -)" \
44+ && rbenv install 3.2.0 \
45+ && rbenv global 3.2.0 \
46+ && ruby -v \
47+ && gem install bundler -v 2.3.26 \
48+ && bundle config set no-cache 'true' \
49+ && bundler install --jobs $(($(nproc) * 2))
3250
3351WORKDIR /var/www
3452
3553COPY --from=composer /usr/bin/composer /usr/bin/composer
3654
37- COPY Gemfile* /var/www/
3855COPY composer.* /var/www/
39- COPY package* /var/www/
4056
41- RUN bundler install --jobs $(($(nproc) * 2)) \
42- && composer install --no-scripts --no-dev \
43- && npm install
57+ RUN composer install --no-scripts --no-dev
4458
4559COPY . /var/www
4660
61+ ENTRYPOINT eval "$(~/.rbenv/bin/rbenv init -)" && docker-php-entrypoint
62+
4763# #######################################
4864
4965FROM prod AS dev
0 commit comments