Skip to content

Commit

Permalink
Fix missing dnf builddep in Dockerfiles
Browse files Browse the repository at this point in the history
The Dockerfiles have been modified to install dnf-plugin-core
regardless of COPR_REPO value to ensure that the dnf builddep
command will work.

Resolves: dogtagpki#4664
  • Loading branch information
edewata committed Mar 4, 2024
1 parent ec4e802 commit 1ea9b0c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
11 changes: 6 additions & 5 deletions base/acme/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,21 @@ LABEL name="$NAME" \

EXPOSE 8080 8443

# Enable COPR repo if specified
RUN if [ -n "$COPR_REPO" ]; then dnf install -y dnf-plugins-core; dnf copr enable -y $COPR_REPO; fi

# Install packages
RUN dnf install -y rpm-build bind-utils iputils abrt-java-connector postgresql postgresql-jdbc \
RUN dnf install -y dnf-plugins-core \
&& dnf clean all \
&& rm -rf /var/cache/dnf

# Enable COPR repo if specified
RUN if [ -n "$COPR_REPO" ]; then dnf copr enable -y $COPR_REPO; fi

# Import PKI sources
COPY . /tmp/pki/
WORKDIR /tmp/pki

# Build and install PKI packages
RUN dnf builddep -y --spec pki.spec \
RUN dnf install -y rpm-build bind-utils iputils abrt-java-connector postgresql postgresql-jdbc \
&& dnf builddep -y --spec pki.spec \
&& ./build.sh --with-pkgs=base,server,acme --work-dir=build rpm \
&& dnf localinstall -y build/RPMS/* \
&& dnf clean all \
Expand Down
11 changes: 6 additions & 5 deletions base/ca/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,21 @@ LABEL name="$NAME" \

EXPOSE 8080 8443

# Enable COPR repo if specified
RUN if [ -n "$COPR_REPO" ]; then dnf install -y dnf-plugins-core; dnf copr enable -y $COPR_REPO; fi

# Install packages
RUN dnf install -y rpm-build \
RUN dnf install -y dnf-plugins-core \
&& dnf clean all \
&& rm -rf /var/cache/dnf

# Enable COPR repo if specified
RUN if [ -n "$COPR_REPO" ]; then dnf copr enable -y $COPR_REPO; fi

# Import PKI sources
COPY . /tmp/pki/
WORKDIR /tmp/pki

# Build and install PKI packages
RUN dnf builddep -y --spec pki.spec \
RUN dnf install -y rpm-build \
&& dnf builddep -y --spec pki.spec \
&& ./build.sh --with-pkgs=base,server,ca --work-dir=build rpm \
&& dnf localinstall -y build/RPMS/* \
&& dnf clean all \
Expand Down

0 comments on commit 1ea9b0c

Please sign in to comment.