Skip to content

Commit

Permalink
Dockerfile and readme
Browse files Browse the repository at this point in the history
  • Loading branch information
JanVana committed May 11, 2017
1 parent 17ef4f2 commit 0c95e93
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 13 deletions.
25 changes: 12 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
41 changes: 41 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
@@ -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/).

0 comments on commit 0c95e93

Please sign in to comment.