11# Dockerfile for the VM/370 Container
2- FROM ubuntu:latest
2+ # Build the things the final image will need
3+ FROM ubuntu:latest
34
4- RUN apt-get update
5+ RUN apt-get update
56RUN apt-get install --no-install-recommends -y unzip wget netcat-traditional ca-certificates
6- RUN apt-get install --no-install-recommends -y hercules dos2unix regina-rexx
7+ RUN apt-get install --no-install-recommends -y dos2unix regina-rexx
78RUN apt-get install --no-install-recommends -y python3 python-is-python3
89
10+ # Build Hercules 3.x
11+ RUN <<EOF
12+ set -x
13+ # Hercules Spinhawk 3.x dependencies:
14+ apt-get install -y autoconf automake build-essential gawk git m4 libbz2-dev zlib1g-dev
15+
16+ mkdir -p ~/build_herc
17+ cd ~/build_herc
18+ # ## TEMP >>>
19+ git clone https://github.com/RossPatterson/spinhawk.git
20+ cd spinhawk
21+ git switch h_0782
22+ # ## This is what we should normally do instead of the above:
23+ # git https://github.com/rbowler/spinhawk.git
24+ # cd spinhawk
25+ # ## <<< TEMP
26+ ./util/bldlvlck
27+ chmod a+x autogen.sh
28+ ./autogen.sh
29+ ./configure --prefix=/usr/local/hercules
30+ make
31+ make check
32+ make install
33+ cd
34+ rm -rf ~/build_herc
35+ mkdir -p /opt/hercules/vm370
36+ echo "export PATH=\" /usr/local/hercules/bin:\$ PATH\" " > /opt/hercules/vm370/setup.sh
37+ echo "export LD_LIBRARY_PATH=\" /usr/local/hercules/lib:\$ LD_LIBRARY_PATH\" " >> /opt/hercules/vm370/setup.sh
38+ EOF
39+
940WORKDIR /opt/hercules/vm370
1041
1142# Local Config files
1243COPY *.sh hercules.conf cleandisks.conf ./
1344RUN dos2unix *.sh hercules.conf cleandisks.conf
1445RUN chmod +x *.sh && \
15- chmod -x hercules.conf cleandisks.conf
46+ chmod -x hercules.conf cleandisks.conf
1647
1748# DASD
1849COPY disks/ ./disks/
@@ -29,8 +60,8 @@ RUN rm cleandisks.conf
2960# Create the final Docker Image
3061FROM ubuntu:latest
3162
32- RUN apt-get update && \
33- apt-get install --no-install-recommends -y hercules c3270 zip unzip netcat-traditional \
63+ RUN apt-get update && \
64+ apt-get install --no-install-recommends -y c3270 zip unzip netcat-traditional \
3465 dos2unix regina-rexx wget ca-certificates python3 python-is-python3 && \
3566 apt-get -y purge $(dpkg --get-selections | grep deinstall | sed s/deinstall//g) && \
3667 rm -rf /var/lib/apt/lists/*
@@ -41,6 +72,7 @@ COPY --from=0 /opt/hercules/vm370/* ./
4172
4273COPY --from=0 /usr/local/bin/herccontrol /usr/local/bin/herccontrol
4374COPY --from=0 /usr/local/bin/yata /usr/local/bin/yata
75+ COPY --from=0 /usr/local/hercules/ /usr/local/hercules/
4476
4577EXPOSE 3270 8038 3505
4678ENTRYPOINT ["/opt/hercules/vm370/start_vm370.sh" ]
0 commit comments