-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
129 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,16 @@ | ||
# anyk-docker | ||
Docker files for ÁNYK | ||
|
||
Docker files for [ÁNYK](https://www.nav.gov.hu/nav/letoltesek/nyomtatvanykitolto_programok/nyomtatvany_apeh/keretprogramok/abevjava_install.html). | ||
|
||
Built on <https://github.com/danielguerra69/ubuntu-xrdp>. | ||
|
||
## How to use | ||
|
||
1. Start one of the docker images with `docker-compose up`. | ||
2. Connect with a remote desktop app to `localhost:3990` (the port may be changed in the docker-compose.yml) | ||
3. User/password: `root`/`root` | ||
|
||
## Docker images | ||
|
||
- ÁNYK only: <https://github.com/Res42/anyk-docker/blob/master/anyk> | ||
- ÁNYK and 19KATA (KATA for 2019): <https://github.com/Res42/anyk-docker/blob/master/anyk-19kata> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
FROM reisingeradam/anyk:2.94.0 | ||
LABEL maintainer="Adam Reisinger" | ||
|
||
# Download and install 19KATA plugin for ANYK | ||
RUN wget https://www.nav.gov.hu/data/cms489660/NAV_19KATA.jar -P ~ \ | ||
# -s: silent (non-gui) install | ||
&& java -jar ~/NAV_19KATA.jar -s \ | ||
&& rm ~/NAV_19KATA.jar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
version: "3" | ||
|
||
services: | ||
anyk: | ||
build: . | ||
image: ${DOCKER_REGISTRY:-reisingeradam}/anyk:2.94.0-19kata | ||
ports: | ||
- "3390:3389" | ||
# - "2222:22" | ||
shm_size: 1g |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
FROM danielguerra/ubuntu-xrdp:18.04 | ||
LABEL maintainer="Adam Reisinger" | ||
|
||
# Install Java 8 | ||
RUN apt-get update && apt-get install -y \ | ||
crudini \ | ||
openjdk-8-jre \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Overwrite entrypoint bash file: removed the user creation script there | ||
COPY ./shared/docker-entrypoint.sh /usr/bin/docker-entrypoint.sh | ||
|
||
RUN echo "root:root" | chpasswd \ | ||
# Create 'Desktop' folder so the ANYK installer can create a shortcut there | ||
&& mkdir ~/Desktop \ | ||
# Download and install ANYK | ||
&& wget https://www.nav.gov.hu/data/cms36637/abevjava_install.jar -P ~ \ | ||
# -s: silent (non-gui) install | ||
# -u: create user settings | ||
&& java -jar ~/abevjava_install.jar -s -u \ | ||
&& rm ~/abevjava_install.jar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
version: "3" | ||
|
||
services: | ||
anyk: | ||
build: | ||
context: .. | ||
dockerfile: anyk/Dockerfile | ||
image: ${DOCKER_REGISTRY:-reisingeradam}/anyk:2.94.0 | ||
ports: | ||
- "3390:3389" | ||
# - "2222:22" | ||
shm_size: 1g |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
#!/bin/bash | ||
|
||
# Add the ssh config if needed | ||
|
||
if [ ! -f "/etc/ssh/sshd_config" ]; | ||
then | ||
cp /ssh_orig/sshd_config /etc/ssh | ||
fi | ||
|
||
if [ ! -f "/etc/ssh/ssh_config" ]; | ||
then | ||
cp /ssh_orig/ssh_config /etc/ssh | ||
fi | ||
|
||
if [ ! -f "/etc/ssh/moduli" ]; | ||
then | ||
cp /ssh_orig/moduli /etc/ssh | ||
fi | ||
|
||
# generate fresh rsa key if needed | ||
if [ ! -f "/etc/ssh/ssh_host_rsa_key" ]; | ||
then | ||
ssh-keygen -f /etc/ssh/ssh_host_rsa_key -N '' -t rsa | ||
fi | ||
|
||
# generate fresh dsa key if needed | ||
if [ ! -f "/etc/ssh/ssh_host_dsa_key" ]; | ||
then | ||
ssh-keygen -f /etc/ssh/ssh_host_dsa_key -N '' -t dsa | ||
fi | ||
|
||
#prepare run dir | ||
mkdir -p /var/run/sshd | ||
|
||
# generate xrdp key | ||
if [ ! -f "/etc/xrdp/rsakeys.ini" ]; | ||
then | ||
xrdp-keygen xrdp auto | ||
fi | ||
|
||
# generate certificate for tls connection | ||
if [ ! -f "/etc/xrdp/cert.pem" ]; | ||
then | ||
# delete eventual leftover private key | ||
rm -f /etc/xrdp/key.pem || true | ||
cd /etc/xrdp | ||
# TODO make data in certificate configurable? | ||
openssl req -x509 -newkey rsa:2048 -nodes -keyout key.pem -out cert.pem -days 365 \ | ||
-subj "/C=US/ST=Some State/L=Some City/O=Some Org/OU=Some Unit/CN=Terminalserver" | ||
crudini --set /etc/xrdp/xrdp.ini Globals security_layer tls | ||
crudini --set /etc/xrdp/xrdp.ini Globals certificate /etc/xrdp/cert.pem | ||
crudini --set /etc/xrdp/xrdp.ini Globals key_file /etc/xrdp/key.pem | ||
|
||
fi | ||
|
||
# generate machine-id | ||
uuidgen > /etc/machine-id | ||
|
||
# set keyboard for all sh users | ||
echo "export QT_XKB_CONFIG_ROOT=/usr/share/X11/locale" >> /etc/profile | ||
|
||
|
||
exec "$@" |