diff --git a/.gitignore b/.gitignore index 76178c9b0..662156404 100644 --- a/.gitignore +++ b/.gitignore @@ -400,3 +400,9 @@ rdurable build-no-tests beacon/spring/out + +# Eclipse junk +*.classpath +*.settings +*.project +*bin \ No newline at end of file diff --git a/docker-build/Dockerfile b/docker-build/Dockerfile new file mode 100644 index 000000000..e208313e7 --- /dev/null +++ b/docker-build/Dockerfile @@ -0,0 +1,15 @@ +FROM ubuntu:18.04 +MAINTAINER docker@unicon.net + +RUN apt-get clean \ + && apt-get -y update \ + && apt-get install -y curl nano vim java-common python-minimal + +RUN curl -L0 https://corretto.aws/downloads/latest/amazon-corretto-11-x64-linux-jdk.deb --output corretto11.deb + +RUN dpkg --install corretto11.deb \ + && rm -f corretto11.deb + +COPY includes/ / + +CMD ["/bin/bash", "/runProject.sh"] \ No newline at end of file diff --git a/docker-build/docker-compose.yml b/docker-build/docker-compose.yml new file mode 100644 index 000000000..cdbc9d358 --- /dev/null +++ b/docker-build/docker-compose.yml @@ -0,0 +1,14 @@ +version: "3" + +services: + builder: + image: unicon/shibuibuilder:1.0 +# If you want a container to docker exec into for manual operations, comment out the environment RUN_COMMAND + environment: + RUN_COMMAND: 'sh gradlew clean' + volumes: + - ../:/shib-idp-ui + +volumes: + shib-idp-ui: + \ No newline at end of file diff --git a/docker-build/includes/runProject.sh b/docker-build/includes/runProject.sh new file mode 100644 index 000000000..7a52fd158 --- /dev/null +++ b/docker-build/includes/runProject.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +if [ "$RUN_COMMAND" != "" ] ; + then + cd shib-idp-ui + cp .gitignore ./FOO.txt + exec $RUN_COMMAND; + else + tail -f /dev/null +fi + diff --git a/docker-build/readme.txt b/docker-build/readme.txt new file mode 100644 index 000000000..b857cec1a --- /dev/null +++ b/docker-build/readme.txt @@ -0,0 +1,18 @@ +BUILD IMAGE: docker build --tag unicon/shibuibuilder:1.0 . + +USE: +If you want to simple use the existing version, you should be able to pull the image from the unicon docker hub site. +Otherwise, build the image first using the above command. + +After building, if you wish to simply execute the build command using the docker-compose file in this folder do: +> docker-compose up + +(or add the -d flag to the end if you don't wish to view the build output) + +The container will stop once the gradle build command has completed. + +If you wish to keep the docker container running for use as a build env, comment out the environment section of the +docker-compose file and then start the container and docker exec into the running container to perform whatever build +tasks you desire. + +You can also alter the default "build" target in the docker-compose file as needed. \ No newline at end of file