-
Notifications
You must be signed in to change notification settings - Fork 14
/
Dockerfile
54 lines (41 loc) · 1.84 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
FROM registry.centos.org/centos/centos:7
ENV LANG=en_US.UTF-8 \
M2_CACHE='/m2_repo/' \
SCANCODE_PATH='/opt/scancode-toolkit/'
RUN mkdir -p ${M2_CACHE}
# https://copr.fedorainfracloud.org/coprs/msrb/mercator/
# https://copr.fedorainfracloud.org/coprs/fche/pcp/
COPY hack/_copr_msrb-mercator-epel-7.repo hack/_copr_fche_pcp.repo /etc/yum.repos.d/
# Install RPM dependencies
COPY hack/install_deps_rpm.sh /tmp/install_deps/
RUN yum install -y epel-release && \
/tmp/install_deps/install_deps_rpm.sh && \
yum clean all
# Work-arounds & hacks:
# 'pip install --upgrade wheel': http://stackoverflow.com/questions/14296531
RUN pip3 install --upgrade 'pip>=10.0.0' && \
pip install --upgrade wheel && \
pip3 install alembic psycopg2
# Install javascript deps
COPY hack/install_deps_npm.sh /tmp/install_deps/
RUN /tmp/install_deps/install_deps_npm.sh
# Install ScanCode-toolkit for license scan
COPY hack/install_scancode.sh /tmp/install_deps/
RUN /tmp/install_deps/install_scancode.sh
# Install gofedlib needed for Go support
RUN pip2 install --egg git+https://github.com/gofed/gofedlib@0674c248fe3d8706f98f912996b65af469f96b10
# Create & set pcp dirs
RUN mkdir -p /etc/pcp /var/run/pcp /var/lib/pcp /var/log/pcp && \
chgrp -R root /etc/pcp /var/run/pcp /var/lib/pcp /var/log/pcp && \
chmod -R g+rwX /etc/pcp /var/run/pcp /var/lib/pcp /var/log/pcp
# Not-yet-upstream-released patches
COPY hack/patches/* /tmp/install_deps/patches/
# Apply patches here to be able to patch selinon as well
RUN /tmp/install_deps/patches/apply_patches.sh
# Cache few Maven plugins and dependencies
COPY pom.xml /tmp/pom.xml
RUN cd /tmp && \
mvn -Dmaven.repo.local=${M2_CACHE} clean verify org.apache.maven.plugins:maven-help-plugin:3.1.0:effective-pom && \
rm /tmp/pom.xml && \
chown -R 999:999 ${M2_CACHE} && \
find ${M2_CACHE} -exec chmod 1777 {} +