celery/docker/Dockerfile

117 lines
3.5 KiB
Docker
Raw Normal View History

FROM debian:jessie
ENV PYTHONIOENCODING UTF-8
# Pypy is installed from a package manager because it takes so long to build.
2019-01-01 12:46:37 +01:00
RUN apt-get update && apt-get install -y build-essential \
libcurl4-openssl-dev \
libffi-dev \
tk-dev \
xz-utils \
curl \
2019-01-01 12:46:37 +01:00
lsb-release \
git \
libmemcached-dev \
2019-01-01 12:46:37 +01:00
make \
liblzma-dev \
libreadline-dev \
2019-01-01 12:46:37 +01:00
libbz2-dev \
llvm \
libncurses5-dev \
libssl-dev \
2019-01-01 12:46:37 +01:00
libsqlite3-dev \
wget \
2019-01-01 12:46:37 +01:00
pypy \
python-openssl \
libncursesw5-dev \
Update CONTRIBUTING.rst, fix tests and update Dockerfile. Related to #5096. (#5143) * Update couchbase install steps Fix integration test for channel leak. We have to inspect the channels created before the tasks are done to ensure we're looking at the correct data Running multiple times test_parallel_chords to make sure test works Add pytest fixtures to t/integration/conftest.py so we don't have to install package to use fixtures Update sphinx test to use sphinx_testing instead of running sphinx-build Bump setuptools Install reqs for all python versions and upgrade pip Update docker-compose to create a tagged image and update PYTHONPATH Add bandit to pkgutils Update contributing documentation and changelog to show 4.3 version Add pkgutils and docs requirements to run sphinx unit tests and use cyanide when running travis Forgot to fix flake8 issues on tests. Remove bandit from pkgutils.txt since tox already installs it. Update CONTRIBUTING.rst to show how to install bandit to run it Fix flake8 issues on test_sphinx and add shared task to the test Update wording for CONTRIBUTING.rst Make python3.6 default python version, mount the entire celery folder so everything can be done inside the container and bump setuptools Update label definitions. Remove cyanide from requirements for now and add bumpversion information. * Update celery.contrib.sphinx. Checking if the object to document is a subclass of BaseTask and has the attribute __wrapped__ should be enough to know if it's a Celery task. Checking if the object is also an instance of Proxy/PromiseProxy makes the extension not work correctly. Probably becuase of how sphinx loads objects and the dunder overrides that the Proxy class does,depending on how sphinx-doc is ran a celery task might be or not a instance of Proxy. * Update Test Case details.
2018-12-01 07:04:49 +01:00
zlib1g-dev \
2019-01-01 12:46:37 +01:00
pkg-config
# Setup variables. Even though changing these may cause unnecessary invalidation of
# unrelated elements, grouping them together makes the Dockerfile read better.
ENV PROVISIONING /provisioning
ARG CELERY_USER=developer
# Check for mandatory build arguments
RUN : "${CELERY_USER:?CELERY_USER build argument needs to be set and non-empty.}"
ENV HOME /home/$CELERY_USER
ENV PATH="$HOME/.pyenv/bin:$PATH"
# Copy and run setup scripts
WORKDIR $PROVISIONING
COPY docker/scripts/install-couchbase.sh .
# Scripts will lose thier executable flags on copy. To avoid the extra instructions
# we call the shell directly.
RUN sh install-couchbase.sh
COPY docker/scripts/create-linux-user.sh .
RUN sh create-linux-user.sh
# Swap to the celery user so packages and celery are not installed as root.
USER $CELERY_USER
COPY docker/scripts/install-pyenv.sh .
RUN sh install-pyenv.sh
# Install celery
WORKDIR $HOME
COPY --chown=1000:1000 requirements $HOME/requirements
COPY --chown=1000:1000 docker/entrypoint /entrypoint
RUN chmod gu+x /entrypoint
# Define the local pyenvs
2019-01-01 12:46:37 +01:00
RUN pyenv local python3.6 python3.5 python3.4 python2.7 python3.7
Update CONTRIBUTING.rst, fix tests and update Dockerfile. Related to #5096. (#5143) * Update couchbase install steps Fix integration test for channel leak. We have to inspect the channels created before the tasks are done to ensure we're looking at the correct data Running multiple times test_parallel_chords to make sure test works Add pytest fixtures to t/integration/conftest.py so we don't have to install package to use fixtures Update sphinx test to use sphinx_testing instead of running sphinx-build Bump setuptools Install reqs for all python versions and upgrade pip Update docker-compose to create a tagged image and update PYTHONPATH Add bandit to pkgutils Update contributing documentation and changelog to show 4.3 version Add pkgutils and docs requirements to run sphinx unit tests and use cyanide when running travis Forgot to fix flake8 issues on tests. Remove bandit from pkgutils.txt since tox already installs it. Update CONTRIBUTING.rst to show how to install bandit to run it Fix flake8 issues on test_sphinx and add shared task to the test Update wording for CONTRIBUTING.rst Make python3.6 default python version, mount the entire celery folder so everything can be done inside the container and bump setuptools Update label definitions. Remove cyanide from requirements for now and add bumpversion information. * Update celery.contrib.sphinx. Checking if the object to document is a subclass of BaseTask and has the attribute __wrapped__ should be enough to know if it's a Celery task. Checking if the object is also an instance of Proxy/PromiseProxy makes the extension not work correctly. Probably becuase of how sphinx loads objects and the dunder overrides that the Proxy class does,depending on how sphinx-doc is ran a celery task might be or not a instance of Proxy. * Update Test Case details.
2018-12-01 07:04:49 +01:00
2019-01-01 12:46:37 +01:00
RUN pyenv exec python2.7 -m pip install --upgrade pip setuptools && \
pyenv exec python3.4 -m pip install --upgrade pip setuptools && \
pyenv exec python3.5 -m pip install --upgrade pip setuptools && \
pyenv exec python3.6 -m pip install --upgrade pip setuptools && \
pyenv exec python3.7 -m pip install --upgrade pip setuptools
# Setup one celery environment for basic development use
2019-01-01 12:46:37 +01:00
RUN pyenv exec python3.7 -m pip install \
-r requirements/default.txt \
-r requirements/test.txt \
-r requirements/test-ci-default.txt \
-r requirements/docs.txt \
-r requirements/test-integration.txt \
-r requirements/pkgutils.txt && \
pyenv exec python3.6 -m pip install \
Update CONTRIBUTING.rst, fix tests and update Dockerfile. Related to #5096. (#5143) * Update couchbase install steps Fix integration test for channel leak. We have to inspect the channels created before the tasks are done to ensure we're looking at the correct data Running multiple times test_parallel_chords to make sure test works Add pytest fixtures to t/integration/conftest.py so we don't have to install package to use fixtures Update sphinx test to use sphinx_testing instead of running sphinx-build Bump setuptools Install reqs for all python versions and upgrade pip Update docker-compose to create a tagged image and update PYTHONPATH Add bandit to pkgutils Update contributing documentation and changelog to show 4.3 version Add pkgutils and docs requirements to run sphinx unit tests and use cyanide when running travis Forgot to fix flake8 issues on tests. Remove bandit from pkgutils.txt since tox already installs it. Update CONTRIBUTING.rst to show how to install bandit to run it Fix flake8 issues on test_sphinx and add shared task to the test Update wording for CONTRIBUTING.rst Make python3.6 default python version, mount the entire celery folder so everything can be done inside the container and bump setuptools Update label definitions. Remove cyanide from requirements for now and add bumpversion information. * Update celery.contrib.sphinx. Checking if the object to document is a subclass of BaseTask and has the attribute __wrapped__ should be enough to know if it's a Celery task. Checking if the object is also an instance of Proxy/PromiseProxy makes the extension not work correctly. Probably becuase of how sphinx loads objects and the dunder overrides that the Proxy class does,depending on how sphinx-doc is ran a celery task might be or not a instance of Proxy. * Update Test Case details.
2018-12-01 07:04:49 +01:00
-r requirements/default.txt \
-r requirements/test.txt \
-r requirements/test-ci-default.txt \
-r requirements/docs.txt \
-r requirements/test-integration.txt \
-r requirements/pkgutils.txt && \
pyenv exec python3.5 -m pip install \
-r requirements/default.txt \
Update CONTRIBUTING.rst, fix tests and update Dockerfile. Related to #5096. (#5143) * Update couchbase install steps Fix integration test for channel leak. We have to inspect the channels created before the tasks are done to ensure we're looking at the correct data Running multiple times test_parallel_chords to make sure test works Add pytest fixtures to t/integration/conftest.py so we don't have to install package to use fixtures Update sphinx test to use sphinx_testing instead of running sphinx-build Bump setuptools Install reqs for all python versions and upgrade pip Update docker-compose to create a tagged image and update PYTHONPATH Add bandit to pkgutils Update contributing documentation and changelog to show 4.3 version Add pkgutils and docs requirements to run sphinx unit tests and use cyanide when running travis Forgot to fix flake8 issues on tests. Remove bandit from pkgutils.txt since tox already installs it. Update CONTRIBUTING.rst to show how to install bandit to run it Fix flake8 issues on test_sphinx and add shared task to the test Update wording for CONTRIBUTING.rst Make python3.6 default python version, mount the entire celery folder so everything can be done inside the container and bump setuptools Update label definitions. Remove cyanide from requirements for now and add bumpversion information. * Update celery.contrib.sphinx. Checking if the object to document is a subclass of BaseTask and has the attribute __wrapped__ should be enough to know if it's a Celery task. Checking if the object is also an instance of Proxy/PromiseProxy makes the extension not work correctly. Probably becuase of how sphinx loads objects and the dunder overrides that the Proxy class does,depending on how sphinx-doc is ran a celery task might be or not a instance of Proxy. * Update Test Case details.
2018-12-01 07:04:49 +01:00
-r requirements/test.txt \
-r requirements/test-ci-default.txt \
-r requirements/docs.txt \
Update CONTRIBUTING.rst, fix tests and update Dockerfile. Related to #5096. (#5143) * Update couchbase install steps Fix integration test for channel leak. We have to inspect the channels created before the tasks are done to ensure we're looking at the correct data Running multiple times test_parallel_chords to make sure test works Add pytest fixtures to t/integration/conftest.py so we don't have to install package to use fixtures Update sphinx test to use sphinx_testing instead of running sphinx-build Bump setuptools Install reqs for all python versions and upgrade pip Update docker-compose to create a tagged image and update PYTHONPATH Add bandit to pkgutils Update contributing documentation and changelog to show 4.3 version Add pkgutils and docs requirements to run sphinx unit tests and use cyanide when running travis Forgot to fix flake8 issues on tests. Remove bandit from pkgutils.txt since tox already installs it. Update CONTRIBUTING.rst to show how to install bandit to run it Fix flake8 issues on test_sphinx and add shared task to the test Update wording for CONTRIBUTING.rst Make python3.6 default python version, mount the entire celery folder so everything can be done inside the container and bump setuptools Update label definitions. Remove cyanide from requirements for now and add bumpversion information. * Update celery.contrib.sphinx. Checking if the object to document is a subclass of BaseTask and has the attribute __wrapped__ should be enough to know if it's a Celery task. Checking if the object is also an instance of Proxy/PromiseProxy makes the extension not work correctly. Probably becuase of how sphinx loads objects and the dunder overrides that the Proxy class does,depending on how sphinx-doc is ran a celery task might be or not a instance of Proxy. * Update Test Case details.
2018-12-01 07:04:49 +01:00
-r requirements/test-integration.txt \
-r requirements/pkgutils.txt && \
pyenv exec python3.4 -m pip install \
-r requirements/default.txt \
-r requirements/test.txt \
Update CONTRIBUTING.rst, fix tests and update Dockerfile. Related to #5096. (#5143) * Update couchbase install steps Fix integration test for channel leak. We have to inspect the channels created before the tasks are done to ensure we're looking at the correct data Running multiple times test_parallel_chords to make sure test works Add pytest fixtures to t/integration/conftest.py so we don't have to install package to use fixtures Update sphinx test to use sphinx_testing instead of running sphinx-build Bump setuptools Install reqs for all python versions and upgrade pip Update docker-compose to create a tagged image and update PYTHONPATH Add bandit to pkgutils Update contributing documentation and changelog to show 4.3 version Add pkgutils and docs requirements to run sphinx unit tests and use cyanide when running travis Forgot to fix flake8 issues on tests. Remove bandit from pkgutils.txt since tox already installs it. Update CONTRIBUTING.rst to show how to install bandit to run it Fix flake8 issues on test_sphinx and add shared task to the test Update wording for CONTRIBUTING.rst Make python3.6 default python version, mount the entire celery folder so everything can be done inside the container and bump setuptools Update label definitions. Remove cyanide from requirements for now and add bumpversion information. * Update celery.contrib.sphinx. Checking if the object to document is a subclass of BaseTask and has the attribute __wrapped__ should be enough to know if it's a Celery task. Checking if the object is also an instance of Proxy/PromiseProxy makes the extension not work correctly. Probably becuase of how sphinx loads objects and the dunder overrides that the Proxy class does,depending on how sphinx-doc is ran a celery task might be or not a instance of Proxy. * Update Test Case details.
2018-12-01 07:04:49 +01:00
-r requirements/test-ci-default.txt \
-r requirements/docs.txt \
-r requirements/test-integration.txt \
-r requirements/pkgutils.txt && \
pyenv exec python2.7 -m pip install \
-r requirements/default.txt \
-r requirements/test.txt \
-r requirements/test-ci-default.txt \
-r requirements/docs.txt \
-r requirements/test-integration.txt \
-r requirements/pkgutils.txt
Update CONTRIBUTING.rst, fix tests and update Dockerfile. Related to #5096. (#5143) * Update couchbase install steps Fix integration test for channel leak. We have to inspect the channels created before the tasks are done to ensure we're looking at the correct data Running multiple times test_parallel_chords to make sure test works Add pytest fixtures to t/integration/conftest.py so we don't have to install package to use fixtures Update sphinx test to use sphinx_testing instead of running sphinx-build Bump setuptools Install reqs for all python versions and upgrade pip Update docker-compose to create a tagged image and update PYTHONPATH Add bandit to pkgutils Update contributing documentation and changelog to show 4.3 version Add pkgutils and docs requirements to run sphinx unit tests and use cyanide when running travis Forgot to fix flake8 issues on tests. Remove bandit from pkgutils.txt since tox already installs it. Update CONTRIBUTING.rst to show how to install bandit to run it Fix flake8 issues on test_sphinx and add shared task to the test Update wording for CONTRIBUTING.rst Make python3.6 default python version, mount the entire celery folder so everything can be done inside the container and bump setuptools Update label definitions. Remove cyanide from requirements for now and add bumpversion information. * Update celery.contrib.sphinx. Checking if the object to document is a subclass of BaseTask and has the attribute __wrapped__ should be enough to know if it's a Celery task. Checking if the object is also an instance of Proxy/PromiseProxy makes the extension not work correctly. Probably becuase of how sphinx loads objects and the dunder overrides that the Proxy class does,depending on how sphinx-doc is ran a celery task might be or not a instance of Proxy. * Update Test Case details.
2018-12-01 07:04:49 +01:00
COPY --chown=1000:1000 . $HOME/celery
Update CONTRIBUTING.rst, fix tests and update Dockerfile. Related to #5096. (#5143) * Update couchbase install steps Fix integration test for channel leak. We have to inspect the channels created before the tasks are done to ensure we're looking at the correct data Running multiple times test_parallel_chords to make sure test works Add pytest fixtures to t/integration/conftest.py so we don't have to install package to use fixtures Update sphinx test to use sphinx_testing instead of running sphinx-build Bump setuptools Install reqs for all python versions and upgrade pip Update docker-compose to create a tagged image and update PYTHONPATH Add bandit to pkgutils Update contributing documentation and changelog to show 4.3 version Add pkgutils and docs requirements to run sphinx unit tests and use cyanide when running travis Forgot to fix flake8 issues on tests. Remove bandit from pkgutils.txt since tox already installs it. Update CONTRIBUTING.rst to show how to install bandit to run it Fix flake8 issues on test_sphinx and add shared task to the test Update wording for CONTRIBUTING.rst Make python3.6 default python version, mount the entire celery folder so everything can be done inside the container and bump setuptools Update label definitions. Remove cyanide from requirements for now and add bumpversion information. * Update celery.contrib.sphinx. Checking if the object to document is a subclass of BaseTask and has the attribute __wrapped__ should be enough to know if it's a Celery task. Checking if the object is also an instance of Proxy/PromiseProxy makes the extension not work correctly. Probably becuase of how sphinx loads objects and the dunder overrides that the Proxy class does,depending on how sphinx-doc is ran a celery task might be or not a instance of Proxy. * Update Test Case details.
2018-12-01 07:04:49 +01:00
WORKDIR $HOME/celery
# Setup the entrypoint, this ensures pyenv is initialized when a container is started
# and that any compiled files from earlier steps or from moutns are removed to avoid
# py.test failing with an ImportMismatchError
ENTRYPOINT ["/entrypoint"]