Skip to content

Commit

Permalink
Initial commit: first working version
Browse files Browse the repository at this point in the history
  • Loading branch information
lemmy04 committed May 7, 2021
1 parent 0d396df commit 0490fcd
Show file tree
Hide file tree
Showing 3 changed files with 112 additions and 0 deletions.
29 changes: 29 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
FROM opensuse/leap:15.2

# date: 2021-05-07

MAINTAINER lemmy04 <[email protected]>

LABEL version=0.0.1 description="Running h3270 in a container"

## install everything needed to run a telegram bot
RUN zypper ar -e -p 75 -r https://download.opensuse.org/repositories/home:/lemmy04/openSUSE_Leap_15.2/home:lemmy04.repo \
&& zypper --gpg-auto-import-keys ref \
&& zypper install -y -l tar bzip2 gzip xz ant tomcat tomcat-servlet-4_0-api junit x3270 \
&& zypper cc --all

ADD ["https://downloads.sourceforge.net/project/h3270/h3270/1.3.3/h3270-1.3.3.tar.gz","/tmp/tarball.tar.gz"]

WORKDIR /tmp
RUN tar xaf /tmp/tarball.tar.gz
WORKDIR /tmp/h3270-1.3.3

ADD ["./build.properties","/tmp/h3270-1.3.3"]
ADD ["h3270-config.xml","webapp/WEB-INF/h3270-config.xml"]

RUN ant war deploy

EXPOSE 8080

CMD /usr/lib/tomcat/server start

5 changes: 5 additions & 0 deletions build.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
servlet.jar=/usr/share/java/servlet.jar
portlet-api.jar=/usr/share/java/portlet-api.jar
dir.deploy=/srv/tomcat/webapps
dir.junit=/usr/share/java
dir.j2ee=/usr/share/java
78 changes: 78 additions & 0 deletions h3270-config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
<?xml version="1.0" encoding="ISO-8859-1" ?>
<h3270>
<!-- path used to locate the s3270 executable -->
<exec-path>/usr/bin</exec-path>

<!-- path to style directory -->
<!-- it is assumed that the directory contains the files -->
<!-- head.jsp, navbar.jsp and stylesheet.jsp -->
<!-- uncomment the following property as example and check -->
<!-- the contents of webapp/it-fws -->
<!-- try "h3270" as a different example -->
<!-- defaults to NO style -->
<!--
<style>it-fws</style>
-->

<!--
<s3270-options>
<charset>german</charset>
<model>3</model>
</s3270-options>
-->

<!-- Use this to let users connect only to a single host -->
<!--
<target-host autoconnect="false">your.host.here</target-host>
-->

<!-- list of available fonts -->
<fonts default="courier">
<font name="courier" description="Courier" />
<font name="freemono" description="Free Mono" />
<font name="terminal" description="Terminal" />
<font name="couriernew" description="Courier New" />
<font name="monospace" description="Monospace" />
</fonts>

<!-- list of available colorschemes -->
<!-- {p|u}: protected/unprotected -->
<!-- {n|i|h}: normal/intensified/hidden -->
<!-- {fg|bg}: foreground/background -->
<!-- example: pifg means protected intensified foreground -->
<colorschemes default="White Background">
<scheme name="White Background" pnfg="black" pnbg="white"
pifg="blue" pibg="white" phfg="white" phbg="white" unfg="green"
unbg="lightgrey" uifg="red" uibg="lightgrey" uhfg="red"
uhbg="lightgrey" />
<scheme name="Dark Background" pnfg="cyan" pnbg="black"
pifg="white" pibg="black" phfg="black" phbg="black" unfg="lime"
unbg="#282828" uifg="red" uibg="#282828" uhfg="red"
uhbg="#282828" />
<scheme name="Amber" pnfg="orange" pnbg="black" pifg="white"
pibg="black" phfg="black" phbg="black" unfg="white"
unbg="#282828" uifg="red" uibg="#282828" uhfg="orange"
uhbg="#282828" />
<scheme name="Black and White" pnfg="black" pnbg="white"
pifg="black" pibg="white" phfg="white" phbg="white"
unfg="black" unbg="lightgrey" uifg="black" uibg="lightgrey"
uhfg="black" uhbg="lightgrey" />

<!--
Will soon rework the scheme element so that it optionally
supports the following format as well, AS.
<scheme name="Amber">
<protected>
<normal background="black" foreground="orange"/>
<hidden background="black" foreground="black"/>
<intensified background="black" foreground="white"/>
</protected>
<unprotected>
</unprotected>
</scheme>
-->
</colorschemes>

</h3270>

0 comments on commit 0490fcd

Please sign in to comment.