From 0c95e93e7bc1ecf44e838ef6d3b2c3e9fa4c3272 Mon Sep 17 00:00:00 2001 From: JanVana Date: Thu, 11 May 2017 23:55:17 +0200 Subject: [PATCH] Dockerfile and readme --- Dockerfile | 25 ++++++++++++------------- readme.md | 41 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+), 13 deletions(-) create mode 100644 readme.md diff --git a/Dockerfile b/Dockerfile index feeb18b..252a1e9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,23 +8,22 @@ RUN apk add openssl RUN mkdir ../resources -RUN wget -O ../resources/odalic.war https://github.com/odalic/sti/releases/download/v1.0.0/odalic-1.0.0.war +RUN wget -O ../resources/odalic.war https://github.com/odalic/sti/releases/download/v1.1-alpha.1/odalic-1.1-SNAPSHOT.war RUN mv -v ../resources/odalic.war webapps/odalic.war -RUN wget -O ../resources/docalic-ui.tar.gz https://github.com/odalic/odalic-ui/archive/v1.0.0.tar.gz -RUN tar -zxvf ../resources/docalic-ui.tar.gz -C ../resources -RUN mv ../resources/odalic-ui-1.0.0 webapps/odalic-ui +RUN wget -O ../resources/ocalic-ui.tar.gz https://github.com/odalic/odalic-ui/archive/v1.1-alpha.1.tar.gz +RUN tar -zxvf ../resources/ocalic-ui.tar.gz -C ../resources +RUN mv ../resources/odalic-ui-1.1-alpha.1 webapps/odalic-ui -RUN wget -O ../resources/resources.tar.gz https://github.com/odalic/odalic-docker-repository/archive/1.0.8.tar.gz +RUN wget -O ../resources/resources.tar.gz https://github.com/odalic/odalic-docker-repository/archive/1.1-alpha.1.tar.gz RUN tar -zxvf ../resources/resources.tar.gz -C ../resources -RUN mv ../resources/odalic-docker-repository-1.0.8/configuration/tomcat/setenv.sh bin/setenv.sh -RUN rm conf/context.xml -RUN mv ../resources/odalic-docker-repository-1.0.8/configuration/tomcat/context.xml conf/context.xml -RUN rm conf/catalina.properties -RUN mv ../resources/odalic-docker-repository-1.0.8/configuration/tomcat/catalina.properties conf/catalina.properties + +RUN mv ../resources/odalic-docker-repository-1.1-alpha.1/tomcat/bin/setenv.sh bin/setenv.sh RUN chmod 750 bin/setenv.sh -RUN mv ../resources/odalic-docker-repository-1.0.8/configuration/odalic conf/odalic -RUN mkdir /usr/local/odalic -RUN mv ../resources/odalic-docker-repository-1.0.8/resources /usr/local/odalic/resources + +RUN rm conf/context.xml +RUN mv ../resources/odalic-docker-repository-1.1-alpha.1/tomcat/conf/context.xml conf/context.xml + +RUN mv ../resources/odalic-docker-repository-1.1-alpha.1/odalic /usr/local/odalic RUN rm -rf ../resources diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..7773f0c --- /dev/null +++ b/readme.md @@ -0,0 +1,41 @@ +# Odalic Docker +Docker for hosting Odalic server and UI v1.1 + +## Docker setup +You can find Docker for all major platforms [here](https://www.docker.com/community-edition). + +Please note, that Docker requires Hyper-V on Windows, so it cannot be installed on Windows 10 Home. + +## Useful Docker commands + +Please navigate to the dockerfile in your Docker console. You can build the Docker image by executing: + +``` +docker build --tag odalic:latest . +``` + +The following Docker command can run the built Docker image: + +``` +docker run -ti --name odalic -p 8080:8080 odalic:latest +``` + +If you want to access the odalic installation files and configuration, you must run the odalic image in the detached mode: + +``` +docker run -d --name odalic -p 8080:8080 odalic:latest +``` + +You can then start Linux command line by executing: + +``` +docker exec -ti odalic sh +``` + +Starting a Docker image will create a Docker container. You can start/stop the created container like this: + +``` +docker start/stop odalic +``` + +For mode advanced command please refer to the [Docker documentation](https://docs.docker.com/engine/reference/commandline/cli/).