Building a docker pbs container

Hello,

I am using https://openpbs.atlassian.net/wiki/spaces/PBSPro/pages/79298561/Using+Docker+to+Instantiate+PBS to instantiate a PBS container however i need to make some modification into the container in order to use it properly. My goal is to standup a container as part of regression test for project called buildtest (GitHub - buildtesters/buildtest: HPC System and Software Testing Framework) so that i can integrate this into github workflow and run tests via pytest.

There are few commands i need to run inorder to get my container setup properly I am trying to build the container with a Dockerfile

FROM pbspro/pbspro
ENV PBS_START_MOM=“1”
RUN yum install -y which python3
&& /opt/pbs/bin/qmgr -c “create node pbs”
&& /opt/pbs/bin/qmgr -c “set node pbs queue=workq”
&& /opt/pbs/bin/qmgr -c “set server job_history_enable=True”

I am not sure if I should be setting PBS_START_MOM in the Dockerfile in order to build container. There is no host option “docker run -h pbs” equivalent in Dockerfile or via “docker build” so i am wondering how i can run commands as root automatically since this needs to be automated. Your help would be appreciated.

(buildtest) bash-3.2$ docker build .



[+] Building 13.0s (5/5) FINISHED
=> [internal] load build definition from Dockerfile
#5 12.71 Verifying : libtirpc-0.2.4-0.16.el7.x86_64 1/6
#5 12.72 Verifying : python3-3.6.8-18.el7.x86_64 2/6
#5 12.73 Verifying : python3-libs-3.6.8-18.el7.x86_64 3/6
#5 12.73 Verifying : which-2.20-7.el7.x86_64 4/6
#5 12.74 Verifying : python3-setuptools-39.2.0-10.el7.noarch 5/6
#5 12.74 Verifying : python3-pip-9.0.3-8.el7.noarch 6/6
#5 12.76
#5 12.76 Installed:
#5 12.76 python3.x86_64 0:3.6.8-18.el7 which.x86_64 0:2.20-7.el7
#5 12.76
#5 12.76 Dependency Installed:
#5 12.76 libtirpc.x86_64 0:0.2.4-0.16.el7 python3-libs.x86_64 0:3.6.8-18.el7
#5 12.76 python3-pip.noarch 0:9.0.3-8.el7 python3-setuptools.noarch 0:39.2.0-10.el7
#5 12.76
#5 12.76 Complete!
#5 12.80 Unknown Host.
#5 12.80 qmgr: cannot connect to server
executor failed running [/bin/sh -c yum install -y which python3 && /opt/pbs/bin/qmgr -c “create node pbs” && /opt/pbs/bin/qmgr -c “set node pbs queue=workq” && /opt/pbs/bin/qmgr -c “set server job_history_enable=True”]: exit code: 3