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 1 commit
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-comp7
scopatz marked this conversation as resolved.
Show resolved Hide resolved
- DOCKERTAG=latest

- os: linux
env:
- DOCKERIMAGE=linux-anvil-ppc64le
Expand Down
59 changes: 59 additions & 0 deletions linux-anvil-cos7-comp7/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

Copy link
Member

@mbargull mbargull Oct 21, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need

Suggested change
ENV LANGUAGE=en_US.UTF-8

as in

ENV LANGUAGE=en_US.UTF-8
for something? If there is no counterargument, I'd suggest to unify this, i.e., either add LANGUAGE or remove it from the other images as well.
https://www.gnu.org/software/gettext/manual/html_node/The-LANGUAGE-variable.html#The-LANGUAGE-variable

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think unifying these would be best as another PR targeted at this issue

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then I'd just add it here and decide in another PR if it can be removed.
(Though not strong opinion, if you disagree.)

# 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 \
defaults::binutils_impl_linux-64 \
defaults::binutils_linux-64 \
conda-forge::gcc_impl_linux-64 \
conda-forge::gcc_linux-64 \
defaults::gfortran_impl_linux-64 \
defaults::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-comp7/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-comp7/entrypoint_source
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Activate the `base` conda environment.
conda activate base