forked from better-together-org/better-together-rails
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.dev
More file actions
40 lines (28 loc) · 1.24 KB
/
Copy pathDockerfile.dev
File metadata and controls
40 lines (28 loc) · 1.24 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
# This Dockerfile is used for the development environment via `docker compose`
# This building libxml2 fixes the security issues with libxml2 2.9.14
FROM ruby:3.4.4-slim AS libxml2-bin
RUN apt-get update -qq \
&& apt-get install -y --no-install-recommends build-essential wget tar gcc pkg-config python3-dev xz-utils \
&& wget https://download.gnome.org/sources/libxml2/2.14/libxml2-2.14.2.tar.xz -O /tmp/libxml2.tar.xz \
&& mkdir -p /tmp/libxml2 \
&& tar -xf /tmp/libxml2.tar.xz -C /tmp/libxml2 --strip-components=1
WORKDIR /tmp/libxml2
RUN ./configure --prefix=/opt/libxml2 PYTHON=/usr/bin/python3
RUN make .
RUN make install \
&& ldconfig \
&& rm -rf /tmp/libxml2 /tmp/libxml2.tar.xz
FROM ruby:3.4.4-slim AS app-host
RUN apt-get update -qq \
&& apt-get install -y --no-install-recommends build-essential \
git nano postgresql-client libpq-dev libssl-dev libyaml-dev \
apt-transport-https ca-certificates libvips42 chromium chromium-driver
# Copy built libxml2 binaries
COPY --from=libxml2-bin /opt/libxml2 /opt/libxml2
ENV LD_LIBRARY_PATH=/opt/libxml2/lib:$LD_LIBRARY_PATH
ENV PKG_CONFIG_PATH=/opt/libxml2/lib/pkgconfig:$PKG_CONFIG_PATH
RUN mkdir -p /bt
WORKDIR /bt
COPY Gemfile /bt/Gemfile
COPY Gemfile.lock /bt/Gemfile.lock
COPY . /bt