Has anyone been able to get the plugins to compile and install along with the app when using the docker containers? Following the instructions here We are able to successfully build and launch the app but none of our plugins are available. When we try to manually install a plugin the container immediately crashes.
here is our Dockerfile
# create the build instance FROM microsoft/dotnet:2.2-sdk AS build
WORKDIR /src COPY ./src ./
# restore solution RUN dotnet restore NopCommerce.sln
WORKDIR /src/Presentation/Nop.Web
# build and publish project RUN dotnet build Nop.Web.csproj -c Release -o /app RUN dotnet publish Nop.Web.csproj -c Release -o /app/published
# create the runtime instance FROM microsoft/dotnet:2.2-aspnetcore-runtime-alpine AS runtime
# add globalization support RUN apk add --no-cache icu-libs ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false
Is it necessary to build a plugin in the Linux environment ("RUN dotnet build Nop.Plugin. ...") to get it to work there? I.e. If I compile my plugin in Windows environment, can it run as-is in the Linux environment?
Does it install the same way (put pre-built plugin folder in \Plugins folder, and restart the site, and it will show on the plugins install page)?
I have exactly the problem you described. It wasn't difficult to make the project compile and run in docker on Linux but each time I tried to add a plugin, the container crashed. I've spent so much time trying to resolve the issue. I don't think it is possible to add plugins or themes compiled in Windows (which is weird - the netcore runtime environment shouldn't care at all). Unfortunately the recommended way of installing plugins (either using 'upload plugin' button or unzipping into the 'Plugins' folder doesn't work). I will follow your advice and change the Dockerfile to compile plugins in place. Just curious if you have found any other solution to the problem.
Building plugins from docker build is the best way. We also noticed several issues with plugin uploading. Moreover, when you build it using Dockerfile, it make sure that your app image is most up to date and easily portable as what docker offers.
I was able to build the plugin template (it did contain a couple errors initially but was able to fix) from the docker build, the folder does show up in the Plugins folder inside the volume, but not in the bin subfolder inside, it's also not showing inside the administration section of the application.
if i manually place the dll in the bin subfolder, the application deletes it.
ok rewriting from scratch worked, i guess the template plugin is incomplete in some regards, didnt go through the differences but a blank plugin with just install and uninstall overrides worked.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.