Skip to content
This repository was archived by the owner on Jan 3, 2023. It is now read-only.

Fix Dockerfiles#63

Merged
jan-cerny merged 12 commits into
OpenSCAP:masterfrom
ybznek:master-fix-dockerfile
Feb 23, 2016
Merged

Fix Dockerfiles#63
jan-cerny merged 12 commits into
OpenSCAP:masterfrom
ybznek:master-fix-dockerfile

Conversation

@ybznek

@ybznek ybznek commented Feb 15, 2016

Copy link
Copy Markdown
Contributor

Fix atomic build dependencies

atomic requires python-requests to build
@ybznek ybznek changed the title Dockerfile(f22,f23,rhel7) add python-requests dep Fix Dockerfiles [in progress] Feb 15, 2016
Comment thread atomic/f23_spc/Dockerfile Outdated
# 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 && \

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread atomic/f22_spc/Dockerfile
RUN dnf -y install scap-security-guide openscap && dnf clean all

RUN dnf -y install atomic && dnf clean all

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@jan-cerny

Copy link
Copy Markdown
Member

Any ideas for better names of directories than atomic and atomic-git?

Comment thread atomic-git/f22_spc/Dockerfile Outdated

RUN dnf -y update && dnf -y groupinstall "Development Tools" && dnf -y install make wget git && dnf clean all

RUN dnf remove -y openscap-containers && \

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it necessary to remove the packages?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not necessary, but safer. If "manual" installation don't override package files, we can use wrong version to test.

@ybznek

ybznek commented Feb 16, 2016

Copy link
Copy Markdown
Contributor Author

I will wait, until projectatomic/atomic#302 will be fixed. We cannot build atomic in container, now (in easy way).

Comment thread atomic-git/f22_spc/Dockerfile Outdated
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 \

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks

@jan-cerny

Copy link
Copy Markdown
Member

Please update also the README .md in atomic directory.

Comment thread atomic/f22_spc/Dockerfile
RUN dnf -y install openscap-containers scap-security-guide openscap-daemon && dnf clean all

RUN dnf -y install wget && dnf clean all

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can do it, question is if it is definitely advantage.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The more layers the worse.

@ybznek ybznek changed the title Fix Dockerfiles [in progress] Fix Dockerfiles Feb 19, 2016
Comment thread atomic-git/f23_spc/Dockerfile Outdated
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 && \

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@jan-cerny jan-cerny self-assigned this Feb 23, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants