forked from samuzzal-choudhury/che-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.rhel7
53 lines (38 loc) · 1.87 KB
/
Dockerfile.rhel7
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.access.redhat.com/rhel7
ARG VERSION=1.0-SNAPSHOT
ENV JAVA_HOME /etc/alternatives/jre
ENV CHE_STARTER_HOME /opt/che-starter
## Default ENV variable values
ENV OSO_ADDRESS tsrv.devshift.net:8443
ENV OSO_DOMAIN_NAME tsrv.devshift.net
ENV KUBERNETES_CERTS_CA_FILE /opt/che-starter/tsrv.devshift.net.cer
# enable rhel-7-server-htb-rpms repository to install java packages
RUN yum-config-manager -q -y --enable rhel-7-server-htb-rpms && \
yum install -y java-1.8.0-openjdk java-1.8.0-openjdk-devel git && \
yum clean all
WORKDIR $CHE_STARTER_HOME
RUN git clone https://github.com/almighty/InstallCert.git && \
javac $CHE_STARTER_HOME/InstallCert/InstallCert.java
RUN chown -R 1000:0 ${CHE_STARTER_HOME} && chmod -R ug+rw ${CHE_STARTER_HOME}
ADD docker-entrypoint.sh $CHE_STARTER_HOME
VOLUME /tmp
# commented out following ADD command as it was failing
# ADD target/che-starter-$VERSION.jar $CHE_STARTER_HOME/app.jar
EXPOSE 10000
# ===========================================================================
# Make image prone for reporting issues via scanner
# add RUN label in image to generate report for container-capabilities-scanner
LABEL RUN='docker run --privileged -d $IMAGE' \
git-url='https://github.com/samuzzal-choudhury/che-starter' \
git-sha='8bd1859' \
email-ids='[email protected]'
# touch /usr/bin/yum inside container image to modify the file time (mtime)
# this will report issue via $rpm -V yum
RUN touch /usr/bin/yum
# Install pip and an older version of pip package so that
# misc-package update scanner can report outdated pip packages
RUN rpm -ivh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
RUN yum -y install python-pip && yum clean all
RUN pip install django==1.11.2
# =============================================================================
ENTRYPOINT ['/opt/che-starter/docker-entrypoint.sh']