GridProtectionAlliance / openPDC

Open Source Phasor Data Concentrator
MIT License
128 stars 59 forks source link

Docker container of openPDC #140

Closed sunnythepatel closed 3 years ago

sunnythepatel commented 3 years ago

Hi Everyone, I am trying to install opePDC on a docker container but facing some issues /opt/openPDC doesn't have openPDC.exe file. I am using this file http://www.gridprotectionalliance.org/Products/openPDC/Scripts/install-openPDC.sh Any help will be much appreciated.

Thank you

Dockerfile
FROM mono:latest
WORKDIR /app
RUN apt-get update \
  && apt-get install -y binutils curl mono-devel ca-certificates-mono fsharp mono-vbnc nuget referenceassemblies-pcl \
  && rm -rf /var/lib/apt/lists/* /tmp/*
RUN apt-get update && apt-get install -y wget  unzip mono-xbuild
COPY install-openPDC.sh /app
RUN pwd && ls
EXPOSE 8900
RUN bash install-openPDC.sh -p
#WORKDIR /app/openPDC
#RUN pwd && ls
#WORKDIR /opt
#RUN pwd && ls
#WORKDIR /opt/openPDC
#RUN pwd && ls
#RUN mono -V
#COPY openPDC.exe .
#RUN  bash register-openPDC.sh
CMD [ "mono", "openPDC.exe", "-RunAsConsole" ]
#CMD [ "/opt/openPDC/openPDC", "start" ]
Output 
Sending build context to Docker daemon  95.48MB
Step 1/9 : FROM mono:latest
 ---> 5e97654e2d01
Step 2/9 : WORKDIR /app
 ---> Running in 1d106f6b0e78
Removing intermediate container 1d106f6b0e78
 ---> 24f6c23c150d
Step 3/9 : RUN apt-get update   && apt-get install -y binutils curl mono-devel ca-certificates-mono fsharp mono-vbnc nuget referenceassemblies-pcl   && rm -rf /var/lib/apt/lists/* /tmp/*
 ---> Running in 434e62e09b74
Processing triggers for libc-bin (2.28-10) ...
Removing intermediate container 1de8801e3106
 ---> 681baed80943
Step 5/9 : COPY install-openPDC.sh /app
 ---> b413ebcb02bb
Step 6/9 : RUN pwd && ls
 ---> Running in 742ccad9b4d0
/app
install-openPDC.sh
Removing intermediate container 742ccad9b4d0
 ---> fd74b7ff4490
Step 7/9 : EXPOSE 8900
 ---> Running in 6660f9a65f7d
Removing intermediate container 6660f9a65f7d
 ---> 1761e2fb91fe
Step 8/9 : RUN bash install-openPDC.sh -p
 ---> Running in e1652c7f2154

Installing openPDC...

cp: cannot stat 'openPDC/Build/Output/Mono/Applications/openPDC/*': No such file or directory
cp: cannot stat 'gsf/Build/Output/Mono/Tools/MonoGenCert/MonoGenCert.exe': No such file or directory
Creating transport layer security keys and certificates...

Cannot open assembly 'MonoGenCert.exe': No such file or directory.
Installing GEP Subscription Tester...

Applying default POSIX configuration to openPDC installation...

openPDC installation complete. To start application, run:
sudo mono /opt/openPDC/openPDC.exe -RunAsConsole
Removing intermediate container e1652c7f2154
 ---> a4e631042642
Step 9/9 : CMD [ "mono", "openPDC.exe", "-RunAsConsole" ]
 ---> Running in 278a06d09b26
Removing intermediate container 278a06d09b26
 ---> 77b3f6e13448
Successfully built 77b3f6e13448
Successfully tagged pmuserver:latest
Successfully tagged pmuserver:1.0.0
sunnythepatel commented 3 years ago
 sudo docker run -p 8900:8900 --name pmuserver pmuserver
Cannot open assembly 'openPDC.exe': No such file or directory.
sunnythepatel commented 3 years ago

Hi @ritchiecarroll Can you please help me with this issue? Thank you

ritchiecarroll commented 3 years ago

Hi Sunny,

I've never tried running the mono-based openPDC on Docker. That script was designed to install into a Linux environment, there are several differences with a Docker deployment.

May be about time to update that script to (1) use latest code, and (2) perhaps add a Docker deployment switch.

Thanks, Ritchie