-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathDockerfile.test
More file actions
61 lines (53 loc) · 1.72 KB
/
Copy pathDockerfile.test
File metadata and controls
61 lines (53 loc) · 1.72 KB
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
53
54
55
56
57
58
59
60
61
ARG PLAT=x86_64
ARG RUBY_VERSION=3.4.3
ARG PG_REPO=https://download.postgresql.org/pub/repos/yum
FROM registry.access.redhat.com/ubi10:latest
ARG RUBY_VERSION
ARG PLAT
ARG PG_REPO
ARG SECRET_KEY_BASE=dummy-value
ENV SECRET_KEY_BASE=$SECRET_KEY_BASE
ENV APP_PATH=/app
ENV LANGUAGE=en_US:en
ENV LANG=C.UTF-8
ENV LC_ALL=C.UTF-8
ENV PLAT=$PLAT
ENV RUBY_VERSION=$RUBY_VERSION
ENV PG_REPO=https://download.postgresql.org/pub/repos/yum
ENV PATH="/usr/local/rvm/gems/ruby-${RUBY_VERSION}@global/bin:/usr/local/rvm/rubies/ruby-${RUBY_VERSION}/bin:$PATH"
WORKDIR $APP_PATH
# Base OS tools, PostgreSQL client libs, RVM & Ruby (unchanged)
COPY rpms/ /tmp/rpms/
RUN dnf --allowerasing -y install \
libpq.${PLAT} \
libpq-devel.${PLAT} \
dnf-plugins-core \
git \
gcc-c++ \
make \
openssl-devel \
diffutils \
procps-ng \
zlib-devel \
which \
tar \
bzip2 \
libyaml-devel \
gnupg2 \
curl \
/tmp/rpms/*.rpm \
${PG_REPO}/reporpms/EL-10-${PLAT}/pgdg-redhat-repo-latest.noarch.rpm \
&& dnf -y install postgresql16 \
&& curl -sSL https://rvm.io/pkuczynski.asc | gpg2 --import - \
&& curl -sSL https://get.rvm.io | bash -s stable \
&& /usr/local/rvm/bin/rvm install ${RUBY_VERSION} \
&& dnf clean all \
&& rm -rf /tmp/rpms
# Gems – install *all* groups (development & test) so rspec, overcommit, etc. are present
COPY Gemfile Gemfile.lock .ruby-version ./
COPY vendor/grape-middleware-logger ./vendor/grape-middleware-logger
RUN test -f /app/vendor/grape-middleware-logger/grape-middleware-logger.gemspec \
&& gem install bundler -v 2.7.2 --no-document \
&& BUNDLE_WITH="development test" bundle install --jobs 4 --retry 3
COPY . $APP_PATH
CMD ["bundle", "exec", "rspec"]