-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathDockerfile-vm370ce
46 lines (40 loc) · 1.73 KB
/
Dockerfile-vm370ce
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
FROM debian:testing-slim
LABEL maintainer="Ricardo Bánffy <rbanffy@gmail.com>"
ARG USERNAME=hercules
ARG USER_UID=1000
ARG USER_GID=$USER_UID
RUN DEBIAN_FRONTEND=noninteractive \
groupadd --gid $USER_GID $USERNAME && \
useradd --uid $USER_UID --gid $USER_GID -m $USERNAME && \
apt update && \
apt upgrade -y && \
apt install -y --no-install-recommends hercules wget unzip && \
cd /home/$USERNAME && \
# Dowload the emultor configuration and disk/tape images
wget -q http://www.vm370.org/sites/default/files/2022-07/VM370CE.V1.R1.2.zip && \
wget -q http://dosvs.31bits.net/DOSVS_5Pack_V1.0-full.zip && \
unzip VM370CE.V1.R1.2.zip && \
mv VM370CE.V1.R1.2/* . && \
unzip DOSVS_5Pack_V1.0-full.zip -d disks && \
# Enable DOS/VS devices.
sed -i 's/#0361/0361/' vm370ce.conf && \
sed -i 's/#0362/0362/' vm370ce.conf && \
sed -i 's/#0363/0363/' vm370ce.conf && \
sed -i 's/#0364/0364/' vm370ce.conf && \
# Enable web UI with the MAINT credentials
sed -i 's/#HTTPPORT 8081/HTTPPORT 8081 AUTH MAINT CPCMS/' vm370ce.conf && \
# Log off the OPERATOR user from the Hercules console
echo '/LOGOFF' >> hercules.rc && \
# Remove unwanted files.
apt purge -y wget unzip && \
apt -y autoremove && \
# Remove the APT package information.
rm -rf /var/lib/apt/lists/* && \
# Remove the files we downloaded.
rm -rf VM370CE.V1.R1.2.zip WC3270 VM370CE.V1.R1.2 DOSVS_5Pack_V1.0-full.zip && \
chown -R $USERNAME:$USERNAME /home/$USERNAME
USER $USERNAME
WORKDIR /home/$USERNAME
EXPOSE 3270/TCP
EXPOSE 8081/TCP
CMD ["hercules", "-f", "vm370ce.conf"]