Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

centos7 image #119

Merged
merged 4 commits into from
Oct 22, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ matrix:
- DOCKERIMAGE=linux-anvil-comp7
- DOCKERTAG=jnlp-slave

- os: linux
env:
- DOCKERIMAGE=linux-anvil-cos7-x86_64
- DOCKERTAG=latest

- os: linux
env:
- DOCKERIMAGE=linux-anvil-ppc64le
Expand Down
59 changes: 59 additions & 0 deletions linux-anvil-cos7-x86_64/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
FROM centos:7

LABEL maintainer="conda-forge <[email protected]>"

# Set an encoding to make things work smoothly.
ENV LANG en_US.UTF-8

# Add a timestamp for the build. Also, bust the cache.
ADD http://worldclockapi.com/api/json/utc/now /opt/docker/etc/timestamp

# Resolves a nasty NOKEY warning that appears when using yum.
RUN rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

# Install basic requirements.
COPY scripts/yum_clean_all /opt/docker/bin/
RUN yum update -y && \
yum install -y \
bzip2 \
sudo \
tar \
which && \
/opt/docker/bin/yum_clean_all

# Run common commands
COPY scripts/run_commands /opt/docker/bin/run_commands
RUN /opt/docker/bin/run_commands

# Download and cache new compiler packages.
# Should speedup installation of them on CIs.
RUN source /opt/conda/etc/profile.d/conda.sh && \
conda activate && \
conda create -n test --yes --quiet --download-only \
conda-forge::binutils_impl_linux-64 \
conda-forge::binutils_linux-64 \
conda-forge::gcc_impl_linux-64 \
conda-forge::gcc_linux-64 \
conda-forge::gfortran_impl_linux-64 \
conda-forge::gfortran_linux-64 \
conda-forge::gxx_impl_linux-64 \
conda-forge::gxx_linux-64 \
defaults::libgcc-ng \
defaults::libgfortran-ng \
defaults::libstdcxx-ng && \
conda remove --yes --quiet -n test --all && \
conda clean -tiy && \
chgrp -R lucky /opt/conda && \
chmod -R g=u /opt/conda

# Add a file for users to source to activate the `conda`
# environment `base`. Also add a file that wraps that for
# use with the `ENTRYPOINT`.
COPY linux-anvil-cos7-x86_64/entrypoint_source /opt/docker/bin/entrypoint_source
COPY scripts/entrypoint /opt/docker/bin/entrypoint

# Ensure that all containers start with tini and the user selected process.
# Activate the `conda` environment `base` and the devtoolset compiler.
# Provide a default command (`bash`), which will start if the user doesn't specify one.
ENTRYPOINT [ "/opt/conda/bin/tini", "--", "/opt/docker/bin/entrypoint" ]
CMD [ "/bin/bash" ]
2 changes: 2 additions & 0 deletions linux-anvil-cos7-x86_64/entrypoint_source
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Activate the `base` conda environment.
conda activate base