Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
grouper/Dockerfile2
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
75 lines (58 sloc)
3.06 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM centos:centos7 | |
LABEL author="tier-packaging@internet2.edu <tier-packaging@internet2.edu>" \ | |
Vendor="TIER" \ | |
ImageType="Grouper" \ | |
ImageName=$imagename \ | |
ImageOS=centos7 | |
ARG GROUPER_CONTAINER_VERSION | |
ENV GROUPER_VERSION=2.6.17 \ | |
GROUPER_CONTAINER_VERSION=$GROUPER_CONTAINER_VERSION \ | |
JAVA_HOME=/usr/lib/jvm/java-1.8.0-amazon-corretto \ | |
PATH=$PATH:$JAVA_HOME/bin \ | |
GROUPER_HOME=/opt/grouper/grouperWebapp/WEB-INF | |
RUN ln -sf /usr/share/zoneinfo/UTC /etc/localtime \ | |
&& echo "NETWORKING=yes" > /etc/sysconfig/network | |
RUN rm -fr /var/cache/yum/* && yum clean all && yum -y install --setopt=tsflags=nodocs epel-release && yum -y update && \ | |
yum -y install net-tools wget curl tar unzip mlocate logrotate strace telnet man vim rsyslog cron httpd mod_ssl dos2unix cronie supervisor && \ | |
yum clean all | |
RUN yum update -y \ | |
&& yum install -y logrotate python3-pip rsync sudo patch supervisor wget tar unzip dos2unix file \ | |
&& pip3 install --upgrade setuptools \ | |
&& yum clean -y all \ | |
&& groupadd -r tomcat \ | |
&& useradd -r -m -s /sbin/nologin -g tomcat tomcat \ | |
&& mkdir -p /opt/container_files | |
# Install Corretto Java JDK | |
#Corretto download page: https://docs.aws.amazon.com/corretto/latest/corretto-8-ug/downloads-list.html | |
ARG JAVA_VERSION=1.8.0 | |
COPY container_files/docker-build-bin /opt/container_files/docker-build-bin/ | |
COPY container_files/morphString.properties /opt/container_files/ | |
COPY container_files/grouper.installer.properties /opt/container_files/ | |
RUN mkdir /opt/container_files/java-corretto | |
COPY container_files/java-corretto/corretto-signing-key.pub /opt/container_files/java-corretto | |
COPY container_files/tier-support /opt/container_files/tier-support/ | |
RUN cd /tmp \ | |
&& chmod +x /opt/container_files/docker-build-bin/*.sh \ | |
&& /opt/container_files/docker-build-bin/containerDockerfileInstallDos2unix.sh /opt/container_files \ | |
&& /opt/container_files/docker-build-bin/containerDockerfileInstallJava.sh $JAVA_VERSION \ | |
&& /opt/container_files/docker-build-bin/containerDockerfileInstallGrouper.sh $JAVA_HOME $GROUPER_VERSION | |
# real copy command (if not caching), uncomment this and change comments of COPY above to work on install script | |
COPY container_files/ /opt/container_files/ | |
RUN cd /tmp \ | |
&& mkdir /etc/shibboleth \ | |
&& chmod +x /opt/container_files/docker-build-bin/*.sh \ | |
&& /opt/container_files/docker-build-bin/containerDockerfileInstallDos2unix.sh /opt/container_files \ | |
&& /opt/container_files/docker-build-bin/containerDockerfileInstall.sh $JAVA_HOME $GROUPER_VERSION | |
# testing container | |
# see output with docker build . --tag my:grouper | |
# DOCKER_BUILDKIT=0 docker build -f Dockerfile2 --progress=plain -t mygrouper . | |
# docker run --detach --name mygrouper mygrouper:latest | |
# docker exec -it mygrouper bash | |
WORKDIR /opt/grouper/grouperWebapp/WEB-INF/ | |
EXPOSE 80 443 | |
HEALTHCHECK NONE | |
#ENTRYPOINT ["/usr/local/bin/entrypoint.sh"] | |
# LOCAL start uncomment ping, and comment out other entrypoint to just have a simple runnable container | |
ENTRYPOINT ["ping"] | |
CMD ["google.com"] | |
# LOCAL end |