├── .gitignore ├── Dockerfile ├── README.md ├── abevjava.sh ├── build-image.sh ├── install.sh ├── jars ├── abevjava_install.jar └── templates │ └── NAV_IGAZOL.jar ├── jre ├── OpenJDK8U-jre_aarch64_linux_hotspot_8u402b06.tar.gz ├── OpenJDK8U-jre_arm_linux_hotspot_8u402b06.tar.gz └── OpenJDK8U-jre_x64_linux_hotspot_8u402b06.tar.gz └── run-abevjava-docker.sh /.gitignore: -------------------------------------------------------------------------------- 1 | userdata/** 2 | .DS_Store 3 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM debian:12.5-slim 2 | 3 | # Make sure we have the necessary command line tools 4 | # as well as some libraries that are mysteriously needed 5 | # in order for OpenJDK to work. 6 | ARG DEBIAN_FRONTEND=noninteractive 7 | RUN apt -y update 8 | RUN apt -y upgrade 9 | RUN apt -y install zlib1g-dev \ 10 | build-essential make pkg-config \ 11 | autoconf automake m4 \ 12 | curl wget \ 13 | libxext6 libxrender1 libxtst6 libxi6 \ 14 | libfreetype6 fontconfig 15 | 16 | # We download all the required dependencies here. 17 | RUN mkdir -p /root/utils 18 | WORKDIR /root/utils 19 | 20 | # Unpack OpenJDK runtime for correct CPU architecture and add it to PATH. 21 | # Delete the archive files to save space in the Docker image 22 | COPY jre jre 23 | ARG TARGETARCH 24 | RUN mkdir -p OpenJDK8U 25 | RUN \ 26 | if [ $TARGETARCH = "arm64" -o $TARGETARCH = "aarch64" ]; then \ 27 | JDKARCH='aarch64'; \ 28 | elif [ $TARGETARCH = "arm" -o $TARGETARCH = "armhf" -o $TARGETARCH = "armel" ]; then \ 29 | JDKARCH='arm'; \ 30 | else \ 31 | JDKARCH='x64'; \ 32 | fi; \ 33 | tar -C OpenJDK8U --strip-components=1 -xf "jre/OpenJDK8U-jre_${JDKARCH}_linux_hotspot_8u402b06.tar.gz" 34 | RUN rm -rf jre 35 | ENV PATH="$PATH:/root/utils/OpenJDK8U/bin" 36 | 37 | # Copy over the ÁNYK/ABEVJAVA installer and form/document plug-in installers. 38 | COPY jars jars 39 | 40 | # Create install directory and user data volume. 41 | # (The former makes `abevjava_install.jar` not ask about creating them, 42 | # making the installation process ever so slightly less painful.) 43 | RUN mkdir -p /usr/share/abevjava 44 | VOLUME /root/abevjava 45 | 46 | # Copy over convenience installer and runner scripts. 47 | COPY install.sh /root/ 48 | COPY abevjava.sh /root/ 49 | RUN chmod +x /root/install.sh 50 | RUN chmod +x /root/abevjava.sh 51 | 52 | # Set workdir to home on startup 53 | WORKDIR /root 54 | 55 | # Fix Quartz on macOS on Apple Silicon (M1/M2/M3) 56 | ENV _JAVA_OPTIONS="-Dsun.java2d.xrender=false" 57 | 58 | # Expose ports to taste 59 | # EXPOSE 80 8000 8080 443 5432 27017 60 | 61 | CMD ./install.sh && \ 62 | echo '************* NOTE *************' && \ 63 | echo 'Run `./install.sh` to run the installer again, if needed.' && \ 64 | echo 'Do **NOT** change the default install or user data location.' && \ 65 | echo '' && \ 66 | echo 'ÁNYK starts automatically after installation.' && \ 67 | echo 'Run `./abevjava.sh` to restart it.' && \ 68 | echo 'Have fun! <3' && \ 69 | echo '********************************' && \ 70 | /root/abevjava.sh 71 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Docker Image for ÁNYK/ABEVJAVA Fuckery 2 | 3 | This is a convenience Docker image for running the abomination called ÁNYK 4 | without having to pollute your own computer with ancient security nightmares 5 | (also called Java by some). 6 | 7 | Comes with the IGAZOL (by NAV) template. 8 | 9 | 1. On macOS, follow [this guide](https://gist.github.com/H2CO3/736967dbdaa7dfc91f87304673eac642) to correctly set up XQuartz. 10 | 2. Install Docker. 11 | 3. Build the image using the provided convenience script: `./build-image.sh .` 12 | 4. Run the image using the provided convenience script: `./run-abevjava-docker.sh /path/to/userdata` - this will mount the `/path/to/userdata` directory under `/root/abevjava` in the running container. 13 | 5. The installers will run automatically. You need to re-install the program every time you launch the container, because the install directory is not mounted as a volume. **Do NOT change the default locations** offered by the installer. 14 | 6. Once the software is installed, use the `./abevjava.sh` script to launch it. 15 | 16 | ## Support for Multiple Templates 17 | 18 | This repository comes with the `IGAZOL` template. 19 | If you want to open other templates (`NAV_24T101` or such), download the necessary `.jar` file and put it in the `jars` directory. All the templates in the folder will be installed upon running `./run-abevjava-docker.sh`. 20 | -------------------------------------------------------------------------------- /abevjava.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | pushd /usr/share/abevjava; 4 | ./abevjava_start; 5 | popd 6 | -------------------------------------------------------------------------------- /build-image.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -eu 4 | 5 | BUILDCTX="$1" 6 | COMMITHASH=$(git rev-parse --short=8 HEAD) 7 | 8 | docker build -t "abevjava:$COMMITHASH" -f Dockerfile "$BUILDCTX" 9 | -------------------------------------------------------------------------------- /install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -eu 4 | 5 | JAR_PATH="/root/utils/jars" 6 | 7 | java -jar "$JAR_PATH/abevjava_install.jar" 8 | 9 | for jar_file in $(ls "$JAR_PATH/templates"/*.jar | sort); do 10 | if [ -f "$jar_file" ]; then 11 | echo "Executing: $jar_file" 12 | java -jar "$jar_file" 13 | fi 14 | done 15 | -------------------------------------------------------------------------------- /jars/abevjava_install.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/H2CO3/abevjava-docker/3004d62211e28e0b990145963f25fc060365a7f9/jars/abevjava_install.jar -------------------------------------------------------------------------------- /jars/templates/NAV_IGAZOL.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/H2CO3/abevjava-docker/3004d62211e28e0b990145963f25fc060365a7f9/jars/templates/NAV_IGAZOL.jar -------------------------------------------------------------------------------- /jre/OpenJDK8U-jre_aarch64_linux_hotspot_8u402b06.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/H2CO3/abevjava-docker/3004d62211e28e0b990145963f25fc060365a7f9/jre/OpenJDK8U-jre_aarch64_linux_hotspot_8u402b06.tar.gz -------------------------------------------------------------------------------- /jre/OpenJDK8U-jre_arm_linux_hotspot_8u402b06.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/H2CO3/abevjava-docker/3004d62211e28e0b990145963f25fc060365a7f9/jre/OpenJDK8U-jre_arm_linux_hotspot_8u402b06.tar.gz -------------------------------------------------------------------------------- /jre/OpenJDK8U-jre_x64_linux_hotspot_8u402b06.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/H2CO3/abevjava-docker/3004d62211e28e0b990145963f25fc060365a7f9/jre/OpenJDK8U-jre_x64_linux_hotspot_8u402b06.tar.gz -------------------------------------------------------------------------------- /run-abevjava-docker.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -eu 4 | 5 | USERDATADIR="$1" 6 | COMMITHASH=$(git rev-parse --short=8 HEAD) 7 | 8 | # create `eKuldes` directory too, so that the installer doesn't ask to create it 9 | mkdir -p $USERDATADIR/eKuldes 10 | 11 | xhost + # allow all connections 12 | docker run --rm -it -e DISPLAY=host.docker.internal:0 -v /tmp/.X11-unix:/tmp/.X11-unix -v "$USERDATADIR:/root/abevjava" "abevjava:$COMMITHASH" 13 | xhost - # disallow connections again, for security. TODO: do this better. 14 | --------------------------------------------------------------------------------