Skip to content

Commit 26b76a0

Browse files
committed
chore: upgrade ruby version
1 parent 31fe18a commit 26b76a0

File tree

2 files changed

+35
-13
lines changed

2 files changed

+35
-13
lines changed

Dockerfile

Lines changed: 30 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,46 +4,63 @@ FROM composer:2.5.1 as composer
44

55
FROM 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

3024
ENV LANG=en_US.UTF-8
31-
ENV PATH /var/www/node_modules/.bin:$PATH
3225

3326
WORKDIR /var/www
3427

35-
COPY --from=composer /usr/bin/composer /usr/bin/composer
28+
ENV PATH /var/www/node_modules/.bin:$PATH
29+
COPY package* /var/www/
30+
31+
RUN (curl -sL https://deb.nodesource.com/setup_19.x | bash) \
32+
&& apt-get update \
33+
&& apt-get install -y --no-install-recommends \
34+
nodejs=19.6.0-deb-1nodesource1 \
35+
&& rm -rf /var/lib/apt/lists/* \
36+
&& npm install
3637

3738
COPY Gemfile* /var/www/
39+
40+
RUN apt-get update \
41+
&& apt-get install -y --no-install-recommends \
42+
libssl-dev \
43+
libyaml-dev \
44+
&& rm -rf /var/lib/apt/lists/* \
45+
&& curl -fsSL https://github.com/rbenv/rbenv-installer/raw/HEAD/bin/rbenv-installer | bash \
46+
&& eval "$(~/.rbenv/bin/rbenv init -)" \
47+
&& rbenv install 3.2.0 \
48+
&& rbenv global 3.2.0 \
49+
&& ruby -v \
50+
&& gem install bundler -v 2.3.26 \
51+
&& bundle config set no-cache 'true' \
52+
&& bundler install --jobs $(($(nproc) * 2))
53+
54+
COPY --from=composer /usr/bin/composer /usr/bin/composer
55+
3856
COPY composer.* /var/www/
39-
COPY package* /var/www/
4057

41-
RUN bundler install --jobs $(($(nproc) * 2)) \
42-
&& composer install --no-scripts --no-dev \
43-
&& npm install
58+
RUN composer install --no-scripts --no-dev
4459

4560
COPY . /var/www
4661

62+
ENTRYPOINT /var/www/entrypoint
63+
4764
########################################
4865

4966
FROM prod AS dev

entrypoint

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/bash
2+
3+
eval "$(~/.rbenv/bin/rbenv init -)"
4+
5+
docker-php-entrypoint "$@"

0 commit comments

Comments
 (0)