-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathDockerfile
61 lines (54 loc) · 1.71 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# arxiv/base
FROM centos:centos7
LABEL maintainer="arXiv <[email protected]>" \
org.opencontainers.image.authors="arXiv IT Team <[email protected]>" \
org.opencontainers.image.version="1.0" \
org.opencontainers.image.title="arXiv Base" \
org.opencontainers.image.description="Base image for arXiv NG applications" \
org.opencontainers.image.url="https://arxiv.github.io/arxiv-base" \
org.opencontainers.image.source="https://github.com/arxiv/arxiv-base" \
org.opencontainers.image.vendor="arXiv.org" \
org.opencontainers.image.licenses="MIT"
LABEL version="0.15.9"
ENV LC_ALL=en_US.UTF-8 \
LANG=en_US.UTF-8 \
APPLICATION_ROOT="/"
# Below we use && chaining and an embedded script in a single RUN
# command to keep image size and layer count to a minimum, while
# the embedded script will make 'docker build' fail fast
# if a package is missing.
#
RUN yum -y install epel-release \
&& yum -y install https://repo.ius.io/ius-release-el7.rpm \
&& echo $'#!/bin/bash\n\
PKGS_TO_INSTALL=$(cat <<-END\n\
ca-certificates\n\
gcc\n\
gcc-c++ \n\
git\n\
mariadb-devel\n\
python36\n\
python36-devel\n\
sqlite\n\
wget\n\
which\n\
END\n\
)\n\
for pkg in ${PKGS_TO_INSTALL}; do\n\
# Stop executing if at least one package is not available:\n\
yum info ${pkg} || {\n\
echo "yum could not find package ${pkg}"\n\
exit 1\n\
}\n\
done\n\
yum -y install ${PKGS_TO_INSTALL}\n' >> /tmp/safe_yum.sh \
&& /bin/bash /tmp/safe_yum.sh \
&& yum clean all \
&& rm /tmp/safe_yum.sh \
&& rm -rf /tmp/* /var/tmp/* \
&& rm -rf /var/lib/apt/lists/*
RUN wget https://bootstrap.pypa.io/get-pip.py \
&& python3.6 get-pip.py \
&& pip install -U pip pipenv uwsgi \
&& rm -rf ~/.cache/pip
CMD /bin/bash