Fix Dockerfiles#63
Conversation
atomic requires python-requests to build
| # TODO: Don't clone from scratch, instead add local working copy there | ||
| RUN dnf -y install git python3 python3-devel python3-gobject-base \ | ||
| python3-setuptools dbus python3-dbus && dnf clean all && \ | ||
| python3-setuptools dbus python3-dbus python-requests && dnf clean all && \ |
There was a problem hiding this comment.
python-requests is not needed to build daemon. We have already tried to build f23 SPC using this dockerfile and the build was successful. I think it is only needed to build atomic. But in this Dockerfile we don't build atomic, we install atomic using dnf. Compare this with other Dockerfiles.
| RUN dnf -y install scap-security-guide openscap && dnf clean all | ||
|
|
||
| RUN dnf -y install atomic && dnf clean all | ||
|
|
There was a problem hiding this comment.
Missing install openscap-utils openscap-daemon openscap-containers.
We already have openscap-containers-1.2.8 in Fedora 22.
I think that the Dockerfile for f22_spc would be very similar to f23_spc dockerfile
|
Any ideas for better names of directories than |
|
|
||
| RUN dnf -y update && dnf -y groupinstall "Development Tools" && dnf -y install make wget git && dnf clean all | ||
|
|
||
| RUN dnf remove -y openscap-containers && \ |
There was a problem hiding this comment.
Is it necessary to remove the packages?
There was a problem hiding this comment.
Not necessary, but safer. If "manual" installation don't override package files, we can use wrong version to test.
|
I will wait, until projectatomic/atomic#302 will be fixed. We cannot build atomic in container, now (in easy way). |
| RUN dnf -y update && dnf -y groupinstall "Development Tools" && dnf -y install make wget git && dnf clean all | ||
|
|
||
| RUN dnf remove -y openscap-containers && \ | ||
| dnf -y install autoconf automake libtool curl-devel libxml2-devel \ |
There was a problem hiding this comment.
dnf builddep openscap && dnf install libtool
should do the trick. The point is that all the dependencies are in the openscap.spec in Fedora. And once they change, you will get them for free.
|
Please update also the README .md in |
| RUN dnf -y install openscap-containers scap-security-guide openscap-daemon && dnf clean all | ||
|
|
||
| RUN dnf -y install wget && dnf clean all | ||
|
|
There was a problem hiding this comment.
Is it possible to install all packages in one dnf command? If we have only one RUN instruction, the built image will have less layers.
There was a problem hiding this comment.
We can do it, question is if it is definitely advantage.
It allows to build git-based image on these SPCs
| RUN git clone https://github.com/OpenSCAP/openscap-daemon && \ | ||
| pushd /openscap-daemon && python3 setup.py install && popd | ||
|
|
||
| RUN dnf -y install python3-requests && git clone https://github.com/projectatomic/atomic.git && \ |
There was a problem hiding this comment.
I have seen the specfile for atomic and python3-requests should be already installed by dnf builddep -y atomic, because it is as BuildRequires in specfile.
Fix atomic build dependencies