-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile-vm370
41 lines (35 loc) · 1.46 KB
/
Dockerfile-vm370
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
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.smrcc.org.uk/members/g4ugm/vm-370/vm370sixpack-1_3.zip && \
unzip vm370sixpack-1_3.zip && \
# Enable CMS/DOS disks.
sed -i 's/#06a0/06a0/' sixpack.conf && \
sed -i 's/#07a0/07a0/' sixpack.conf && \
# Enable web UI with the MAINT credentials
sed -i 's/#HTTPPORT 8081/HTTPPORT 8081 AUTH MAINT CPCMS/' sixpack.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 /var/lib/apt/lists/* vm370sixpack-1_3.zip WC3270 && \
chown -R $USERNAME:$USERNAME /home/$USERNAME
USER $USERNAME
WORKDIR /home/$USERNAME
EXPOSE 3270/TCP
EXPOSE 8081/TCP
CMD ["hercules", "-f", "sixpack.conf"]