Skip to content

Commit

Permalink
Add a centos6 Dockerfile (#5167)
Browse files Browse the repository at this point in the history
### Problem

The wheels built in #5118 and consumed in #5159 are built in debian wheezy, meaning that they have a glibc 2.13 dependency... centos6 (still consumed in various places at Twitter) uses glibc 2.12.

More generally, it is beneficial to have binary releases of pants be compatible with as many linux distributions as possible (those that are in active use, at least).

### Solution

Add a centos6 docker image, which was previously confirmed here to be capable of building pants.

### Result

In a future change (once this image is published to https://hub.docker.com/r/pantsbuild/), we will switch the linux binary builder shard (`build-support/docker/travis_ci/Dockerfile`) to this image.
  • Loading branch information
Stu Hood authored Dec 13, 2017
1 parent 1cc5897 commit 47ddef1
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
18 changes: 18 additions & 0 deletions build-support/docker/centos6/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Copyright 2017 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).

# Use centos6 for compatibility with glibc 2.12.
FROM centos:6

# Install python 2.7.13, (more) modern gcc, and a JDK.
RUN yum -y update
RUN yum install -y centos-release-scl
RUN yum install -y \
devtoolset-7-gcc \
devtoolset-7-gcc-c++ \
git \
java-1.8.0-openjdk-devel \
python27

# By default, execute in an environment with python27 enabled.
ENTRYPOINT ["/usr/bin/scl", "enable", "python27", "devtoolset-7", "--"]
3 changes: 3 additions & 0 deletions build-support/docker/travis_ci/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,7 @@ RUN groupadd --gid ${TRAVIS_GID} ${TRAVIS_GROUP}
RUN useradd -d /travis/home -g ${TRAVIS_GROUP} --uid ${TRAVIS_UID} ${TRAVIS_USER}
USER ${TRAVIS_USER}:${TRAVIS_GROUP}

# Ensure Pants runs under the 2.7.13 interpreter.
ENV PANTS_PYTHON_SETUP_INTERPRETER_CONSTRAINTS="['CPython==2.7.13']"

WORKDIR /travis/workdir

0 comments on commit 47ddef1

Please sign in to comment.