-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
55 lines (46 loc) · 2.08 KB
/
Dockerfile
File metadata and controls
55 lines (46 loc) · 2.08 KB
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
FROM quay.io/cloudian/centos-ssh:7.9.2009
ENV SBVER=4.4.1
ENV ANTVER=1.9.9
ENV FBVER=3.0.1
ENV JAVA_HOME=/usr/lib/jvm/java
RUN yum install -y git maven python3-pip zip java-11-openjdk-devel ncurses-devel gcc-c++ rpm-build
RUN pip3 install pip --upgrade
RUN pip3 install awscli --upgrade
ADD apache-ant-1.9.9-bin.tar.gz /usr/local/
ADD findbugs-3.0.1.tar.gz /usr/local/
ADD spotbugs-${SBVER}.tgz /usr/local/
ADD sudoers /etc/sudoers.d/
ADD apache-maven-3.8.1-bin.tar.gz /opt
RUN (ln -s /usr/local/apache-ant-${ANTVER} /usr/local/ant; \
ln -s /usr/local/apache-ant-${ANTVER} ${JAVA_HOME}/ant; \
ln -s /usr/local/findbugs-${FBVER}/ /usr/share/; \
ln -s /usr/local/findbugs-${FBVER} /usr/share/findbugs; \
ln -s /usr/share/findbugs/bin/findbugs /usr/local/bin/; \
ln -s /usr/local/spotbugs-${SBVER}/ /usr/share/; \
ln -s /usr/local/spotbugs-${SBVER} /usr/share/spotbugs; \
ln -s /usr/local/spotbugs-${SBVER} /usr/local/spotbugs; \
ln -s /usr/local/spotbugs-${SBVER}/bin/spotbugs /usr/local/bin/; \
ln -s /usr/local/spotbugs/lib/spotbugs-ant.jar ${JAVA_HOME}/ant/lib/; \
ln -s /opt/apache-maven-3.8.1 /opt/apache-maven; \
chmod 755 /usr/local/spotbugs/bin/spotbugs; \
sed -i '/grant *{/a permission javax.management.MBeanTrustPermission "register";' ${JAVA_HOME}/jre/lib/security/java.policy)
ADD ant-findbugs.jar /usr/local/ant/lib
##########################################################################
# worker
RUN (useradd -u 1000 worker; echo "worker:password" | chpasswd; \
mkdir -p /var/log/cloudian; chown worker:worker /var/log/cloudian)
ADD bashrc /home/worker/.bashrc
########
# golang
########
RUN (GOL=go1.16.3.linux-amd64.tar.gz; \
curl -O https://dl.google.com/go/${GOL}; \
rm -rf /usr/local/go && tar -C /usr/local -xzf ${GOL}; \
ln -sf /usr/local/go/bin/go /usr/bin/go; \
go get github.com/tebeka/go2xunit; \
su - worker -c "go get github.com/tebeka/go2xunit"; \
rm -f ${GOL})
RUN (alternatives --set java java-11-openjdk.x86_64; \
alternatives --set javac java-11-openjdk.x86_64)
EXPOSE 22
CMD ["/sbin/init"]