Skip to content
This repository has been archived by the owner on Feb 7, 2024. It is now read-only.

Commit

Permalink
docker: Update for Tito builds
Browse files Browse the repository at this point in the history
  • Loading branch information
mgrabovsky committed Oct 21, 2020
1 parent c02a9e7 commit 44390b2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
6 changes: 3 additions & 3 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM fedora:32
USER root
RUN dnf --assumeyes install git-core make tito && \
RUN dnf --assumeyes install git-core tito && \
git clone --quiet https://github.com/abrt/retrace-server.git /src && \
dnf --assumeyes builddep --spec /src/retrace-server.spec && \
useradd --no-create-home builder && \
Expand All @@ -11,9 +11,9 @@ RUN tito build --output=rpm --rpm --test

FROM fedora:32 as build
USER root
COPY --from=0 /src/rpm/noarch/retrace-server*.rpm rpm/
COPY --from=0 /src/rpm/noarch/retrace-server-*.rpm rpm/
RUN \
dnf --assumeyes install mod_ssl uwsgi rpm/retrace-server*.rpm && \
dnf --assumeyes install mod_ssl uwsgi rpm/retrace-server-*.rpm && \
dnf clean all

FROM build
Expand Down
10 changes: 4 additions & 6 deletions docker/Dockerfile_local
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,23 @@ WORKDIR '/retrace-server'
# Change owner of /retrace-server, clean git and install dependences
RUN chown -R --silent retrace /retrace-server && \
chmod -R --silent g=u /retrace-server && \
dnf -y install rpm-build sudo git make vim && \
dnf -y install git meson rpm-build sudo tito vim && \
git clean -dfx && \
eval dnf -y --setopt=strict=0 --setopt=tsflags=nodocs install $(./autogen.sh sysdeps)
dnf --assumeyes builddep --spec /retrace-server/retrace-server.spec

# Build as non root
USER retrace

ENV HOME /retrace-server

# Build retrace-server
RUN ./autogen.sh && \
./configure && \
make rpm
RUN tito build --output=rpm --rpm --test

#And continue as root
USER 0

# Update FAF
RUN rpm -Uvh noarch/retrace-server-* && \
RUN rpm -Uvh /retrace-server/rpm/noarch/retrace-server-*.rpm && \
/usr/libexec/fix-permissions /retrace-server && \
/usr/libexec/fix-permissions /var/log/retrace-server && \
/usr/libexec/fix-permissions /var/spool/retrace-server && \
Expand Down

0 comments on commit 44390b2

Please sign in to comment.