How to use multiple commands in the Docker Entrypoint for a vFunction Controller
Overview of the Issue
- An organization uses a Linux Container to start a .NET Application
- vFunction recommends using a startup.sh script to start the vFunction Controller process at runtime and start the Application
- The organization cannot replace the Entrypoint with a startup.sh script because it is against the organization’s policy
### Instead of DLL, the filename of the dll would be listed below
ENTRYPOINT ["dotnet", "DLL"]
Solution
- Create a multi-command Entrypoint to first run the vFunction restart-controller.sh script and then run the dotnet command
### Find-and-Replace WORKDIR with the WORKDIR of the Application
### Find-and-replace DLL with the DLL that is run for the application
ENTRYPOINT ["/bin/bash", "-c", "bash /tmp/vfunction/opt/vfunction/controller-installation/restart-controller.sh -i default-dotnet;cd WORKDIR;dotnet DLL"]
- Build and Deploy the Application