kszucs commented on a change in pull request #7021: URL: https://github.com/apache/arrow/pull/7021#discussion_r419709631
########## File path: docs/source/developers/docker.rst ########## @@ -0,0 +1,197 @@ +.. raw:: html + + <!-- + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + --> + +Running Docker Builds +===================== + +Most of our Linux based continuous integration tasks are decoupled from public +CI services using docker and docker-compose. Keeping the CI configuration +minimal makes local reproducibility possible. + +Usage +----- + +There are multiple ways to execute the docker based builds. The recommended is +to use the archery tool: + +Installation +~~~~~~~~~~~~ + +Requires ``python>=3.5``. It is recommended to install archery in ``editable`` +mode to automatically update the intallation by pulling the arrow repository. + +.. code:: bash + + pip install -e dev/archery[docker] + +Inspect the available commands and options +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code:: bash + + archery docker --help + archery docker run --help + +``archery docker run`` tries to provide a similar interface to +``docker-compose run``, but with builtin support for building hierarchical +images. + +Examples +~~~~~~~~ + +**Execute a build:** + +.. code:: bash + + archery docker run conda-python + +Archery calls the following docker-compose commands: + +.. code:: bash + + docker-compose pull --ignore-pull-failures conda-cpp + docker-compose build conda-cpp + docker-compose pull --ignore-pull-failures conda-python + docker-compose build conda-python + docker-compose run --rm conda-python + +**To disable the image pulling:** + +.. code:: bash + + archery docker run --no-cache conda-python + +Which translates to: + +.. code:: bash + + docker-compose build --no-cache conda-cpp + docker-compose build --no-cache conda-python + docker-compose run --rm conda-python + +**To disable the cache only for the leaf image:** + +Useful to force building the development version of a dependency. +The leaf image is ``conda-python-pandas`` in the example. + +.. code:: bash + + PANDAS=master archery docker run --no-cache-leaf conda-python-pandas + +Which translates to: + +.. code:: bash + + export PANDAS=master + docker-compose pull --ignore-pull-failures conda-cpp + docker-compose build conda-cpp + docker-compose pull --ignore-pull-failures conda-python + docker-compose build conda-python + docker-compose build --no-cache conda-python-pandas + docker-compose run --rm conda-python-pandas + Review comment: Added. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org