[CRIU] [PATCH 2/2] travis: set python3 as default for fedora containers
Radostin Stoyanov
rstoyanov1 at gmail.com
Thu May 31 09:57:59 MSK 2018
On 30/05/18 18:36, Andrei Vagin wrote:
> On Wed, May 30, 2018 at 12:18:21PM +0200, Adrian Reber wrote:
>> On Tue, May 29, 2018 at 11:45:29PM +0300, Andrei Vagin wrote:
>>> We need a few jobs to check a compatibility with python3
>>>
>>> Signed-off-by: Andrei Vagin <avagin at virtuozzo.com>
>>> ---
>>> scripts/build/Dockerfile.fedora.tmpl | 4 ++++
>>> 1 file changed, 4 insertions(+)
>>>
>>> diff --git a/scripts/build/Dockerfile.fedora.tmpl b/scripts/build/Dockerfile.fedora.tmpl
>>> index 96a41f191..c2be7bfce 100644
>>> --- a/scripts/build/Dockerfile.fedora.tmpl
>>> +++ b/scripts/build/Dockerfile.fedora.tmpl
>>> @@ -23,6 +23,7 @@ RUN dnf install -y \
>>> python-ipaddress \
>>> # Starting with Fedora 28 this is python2-pyyaml
>>> python-yaml \
>>> + python3-pip \
>>> python2-future \
>>> tar \
>>> which
>>> @@ -33,6 +34,9 @@ RUN dnf install -y \
>>> # > sh: /usr/bin/sort: /usr/bin/coreutils: bad interpreter: No such file or directory
>>> RUN dnf install -y --allowerasing coreutils
>>>
>>> +RUN ln -sf python3 /usr/bin/python
>>> +RUN pip3 install PyYAML future ipaddress protobuf junit-xml
>>> +
>> Why are you installing the packages via pip and not dnf/yum? The
>> packages should all be part of Fedora.
> I'm too lazy to search names for these packages in fedora;)
(the names for dnf/yum are with "python3-" prefix)
RUN dnf install -y python3-PyYAML python3-future python3-protobuf
python3-junit_xml
The ipaddress [1] module is integrated into Python 3. The package
available in pip
(and python2-ipaddress for dnf/yum) is backport for Python 2 [2].
BTW reducing the number of RUN statements in the Dockerfile will reduce
the number
of layers in the container image and therefore will improve the build
performance.
[1] https://docs.python.org/3/library/ipaddress.html#module-ipaddress
[2] https://github.com/phihag/ipaddress
>>> COPY . /criu
>>> WORKDIR /criu
>> Adrian
> _______________________________________________
> CRIU mailing list
> CRIU at openvz.org
> https://lists.openvz.org/mailman/listinfo/criu
More information about the CRIU
mailing list