Challenge Overview
Scope
For this challenge, we'd like to build a docker image which contains the necessory environment for build and running direct-app similar as in Topcoder Consolidated VM.
The Dockerfile will be used to build the docker image which setup the necessory software and packages, so after the docker image is built, we can do like
1. docker run with --add-host option to let the docker container can connect to external informix database.
2. inside the docker container (git clone https://github.com/appirio-tech/direct-app)
3. revise the token.properties
4. deploy the direct-app by `ant deploy`
5. start jboss service
then we can access the Topcoder direct locally.
Requirements
1. Previously, we have build the environment prod environment, which you can learn from, see https://github.com/appirio-tech/direct-app/tree/dev/docker/direct-app-build and https://github.com/appirio-tech/direct-app/tree/dev/docker/direct-app
you create a similar folder under docker like docker-app-local
2. Instead of direct user, for docker container, all setup should under root home.
3. Please install Oracle JDK 7 instead of openJDK (which is used in direct-app-build and direct-app)
4. Related setup files can be put under direct-app-local directory, and then copied over to docker image, but please use official site as much as possible, like jboss 4.2.3, apache ant 1.7.0, grails 1.3.7 etc.
5. Environment variables settings in ~/.bash_profile (in VM) should be properly set in Dockerfile.
6. software can be setup under /root or /opt directory, but please follow the same approach as in VM, if there is any problem, please raise in forum, so we can discuss a solution.
7. The base image should be FROM centos:6
Verification
As stated in the scope section, with the built docker image by using your solution, we can follow the given steps to build and run direct-app inside the docker container.
since this setup is one-time, we can build and push it into dockerhub, then we can have another Dockerfile under direct-app, which can be used to copy over the source code to docker container, build, deploy and run the services.
Final Submission Guidelines
- A direct-app-local folder with a Dockerfile and related setup files.
- A Markdown document, clearly described the usage and way to run the direct-app inside the docker.