[devdocsgjs/wip/andyholmes/f37] Dockerfile: refactor to avoid fedora:33 stage
- From: Andy Holmes <andyholmes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [devdocsgjs/wip/andyholmes/f37] Dockerfile: refactor to avoid fedora:33 stage
- Date: Mon, 19 Sep 2022 02:59:41 +0000 (UTC)
commit 1e30261a738f55dc0435d357aaba1c33a337abbb
Author: Andy Holmes <andrew g r holmes gmail com>
Date: Sun Sep 18 19:59:25 2022 -0700
Dockerfile: refactor to avoid fedora:33 stage
We've been using an intermediate `fedora:33` stage to build DevDocs,
because of our dependency on `ruby-2.7.6`. The consequence of this is
that we've not been generating documentation with the current version
of `g-ir-doc-tool`, which is becoming more of a problem now.
Some notable quirks:
* After installing the builddeps for ruby, we have to force install
`openssl1.1-devel` for it to build correctly
* Because `gobject-introspection-1.74.0` is incompatible with
`python3-markdown-3.4.1`, we install `Markdown-3.3.7` using `pip3`
Dockerfile | 31 ++++++++++++-------------------
1 file changed, 12 insertions(+), 19 deletions(-)
---
diff --git a/Dockerfile b/Dockerfile
index fae887ee..be4481fd 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,5 +1,5 @@
# We bump this each release to fetch the latest stable GIRs
-FROM registry.fedoraproject.org/fedora:37 AS fetch
+FROM registry.fedoraproject.org/fedora:37 AS build
RUN dnf install -y \
NetworkManager-libnm-devel cairo-devel colord{,-gtk,-gtk4}-devel \
@@ -22,20 +22,13 @@ RUN dnf install -y \
udisks-devel upower-devel vte{,291,291-gtk4}-devel \
webkit2gtk{4.0,4.1,5.0}-devel \
wireplumber-devel && \
+ dnf install -y 'dnf-command(builddep)' @development-tools bzip2 gcc-c++ && \
+ dnf builddep -y ruby && \
+ dnf install -y --allowerasing openssl1.1-devel python3-pip && \
+ pip3 install -I 3.3.7 && \
dnf clean all && \
rm -rf /var/cache/dnf
-
-# We build in fedora:33 for the ruby dependency
-FROM registry.fedoraproject.org/fedora:33 AS build
-
-ENV LANG=C.UTF-8
-
-# These are GIRs from the fetch step
-COPY --from=fetch /usr/share/gir-1.0 /usr/share/gir-1.0
-COPY --from=fetch /usr/share/gnome-shell /usr/share/gnome-shell
-COPY --from=fetch /usr/lib64/mutter-11 /usr/lib64/mutter-11
-
# These are extra GIRs we can't install with dnf
COPY lib/docs/scrapers/gnome/girs/*.gir /usr/share/gir-1.0/
COPY lib/docs/scrapers/gnome/girs/mutter-3 /usr/lib64/mutter-3
@@ -47,13 +40,13 @@ COPY lib/docs/scrapers/gnome/girs/mutter-8 /usr/lib64/mutter-8
COPY lib/docs/scrapers/gnome/girs/mutter-9 /usr/lib64/mutter-9
COPY lib/docs/scrapers/gnome/girs/mutter-10 /usr/lib64/mutter-10
-# Install devdocs dependencies
-RUN dnf install -y 'dnf-command(builddep)' @development-tools bzip2 gcc-c++ && \
- dnf builddep -y ruby && \
- dnf install -y ruby rubygem-bundler ruby-devel python3-markdown \
- gobject-introspection-devel && \
- dnf clean all && \
- rm -rf /var/cache/dnf
+# Install ruby-2.7.6
+RUN curl -Os http://ftp.ruby-lang.org/pub/ruby/2.7/ruby-2.7.6.tar.gz && \
+ tar -xvzf ruby-2.7.6.tar.gz && \
+ cd ruby-2.7.6 && \
+ ./configure --prefix=/usr/local && \
+ make && \
+ make install
# Install the devdocs application
COPY . /opt/devdocs/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]