Skip to content
This repository was archived by the owner on Nov 17, 2023. It is now read-only.

99. FAQ (Frequently Asked Questions)

Cesar De la Torre edited this page Oct 28, 2017 · 17 revisions

FAQ about eShopOnContainers

Support questions

Is Visual Studio 2015 supported

Short answer is NO. There are a lot of changes between VS2017 and VS2015 regarding netcore project format (no more project.json) and Docker support.

When the project started, VS2017 were not still available, so the project started with VS2015. There is an old version of the project that works with VS2015 and Docker. You can find it using the vs2015 tag but is currently not supported. For more information about this version read the corresponding wiki section.

I want to submit a PR

Glad to hear it! We are open to PRs, just keep in mind three (little) things:

  1. Ensure that there is no any active development that is targeting your PR. If you find a bug and want to solve it, ensure that there are not any active issue with that bug. We open issues for any bug we found during our testing. If you find an issue with the same bug, probably this bug is in development. In case of doubt feel free to ask in the issue. If you don't find the issue, feel free to open a new one and just note in the comments that you will address it a upcoming PR.

  2. When submitting a PR, reference the issue that the PRs solves (if any)

  3. All PR must be done against the dev branch. Any PR against master won't be accepted (with a few exceptions). This is to avoid merge conflicts between master and dev. Dev is where all development is happening.

Are Linux or Mac supported?

Yes. For Linux the CLI is supported. For Mac we support both CLI and Visual Studio for Mac. Feel free to report any issue you found using Mac or Linux.

How can I manage and test the RabbitMQ server running in the container?

You need to connect to the port 15672 like: http://127.0.0.1:15672/

And using these credentials: user:guest pwd:guest

Bugs or warnings

The SQL Server container is not running

It looks like the SQL container tried to start but then it exited? If I do a "docker ps -a", the STATUS column for the SQL container does NOT show a status of "Up" but shows the STATUS as "Exited". Workaround: Usually this is due to not enough memory assigned to the Docker Host Linux VM. IMPORTANT: Note that sometimes after installing a "Docker for Windows" update it might have reset the assigned memory value and it might be 2GB again (see Docker issue https://github.com/docker/for-win/issues/1169), which is not enough for the SQL container. Set, at least, 4GB of memory to the Docker Host in "Docker for Windows" settings.

When I run the solution(using Visual Studio 2017 or the CLI) I see one or more warnings like "The ESHOP_AZURE_XXXX variable is not set. Defaulting to a blank string."

You can ignore those warnings. They're not from VS2017 but from docker-compose. These variables are used to allow eShopOnContainers use external resources (like Redis or SQL Server) from Azure. If they're not set, the docker-compose.override.yml file use defaults values that are good when running everything locally. So, the rule is:

When I run "docker-compose up" I receive an error like ERROR: Service 'xxxxx' failed to build: COPY failed: stat /var/lib/docker/tmp/docker-builder123456789/obj/Docker/publish: no such file or directory

This error is produced because some Docker image can't be built. This is because the project is not published. All projects are published in their obj/Docker/publish folder. If there is any compilation error, the project won't be published and the corresponding docker image can't be built, and you will receive this error.

Note: When you run the project using F5 from VS2017, projects are not published, so you won't receive this error in VS2017.

When I build the SPA I receive a Cannot read property '0' of undefined in "npm install"

This is because of npm 5.3.0 on newer versions of nodejs. Downgrade to npm 5.2.0 until a fix is released. For more info check this issue

When trying to logging from MVC app the following error appears: IDX10803: Unable to obtain configuration from: 'http://10.0.75.1:5105/.well-known/openid-configuration'

Deploying in Windows with Docker for Windows

First open a browser and navigate to http://10.0.75.1:5105/.well-known/openid-configuration. You should receive json response. If not, ensure that Identity.API and Docker are running without issues.

If response is received the problem is that the request from a container cannot reach the 10.0.75.1 (which is the IP of the host machine inside the DockerNAT). Be sure that:

  • You have opened the ports of the firewall (run the script cli-windows\add-firewall-rules-for-sts-auth-thru-docker.ps1

If this do not solved your problem ensure that the vpnkit of the firewall is disabled. For more info refer to @huangmaoyixxx's comment in issue #295

Another possibility is that the ASP.NET Identity database was not generated right or in time by EF Migrations when the app first started because the SQL container was too slow to be ready for the Identity service. You can have a workaround for that by increasing the number of retries with exponential backoff of the EF Contexts within the Identity.API service (i.e. increase maxRetryCount at the sqlOptions provided to the ConfigureDbContext). Or simply, try re-deploying the app into Docker.

Deploying in a Mac with Docker for Mac

In a Mac, youn cannot use the 10.0.75.1 IP, so you need to change that in the docker-compose.override.yml file, replace the IdentityUrl environment variable (or any place where the IP 10.0.75.1 is used) with:

   IdentityUrl=http://docker.for.mac.localhost:5105

Now, open a browser and navigate to http://docker.for.mac.localhost:5105/.well-known/openid-configuration.

You should receive json response. If not, ensure that Identity.API and Docker are running without issues.

When I try to run the solution in "Docker for Windows" (on the Linux VM) I get the error "Did you mean to run dotnet SDK commands?"

If you get this error: Did you mean to run dotnet SDK commands? Please install dotnet SDK from: http://go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409

That usually happens when you just switched from Windows Containers to Linux Containers in "Docker for Windows". This might be a temporal bug in "Docker for Windows" environment. Workaround: Reboot your machine and you should be able to deploy to Linux Containers without these issues.

When I build the bits with the Docker build-container, when it is running "dotnet publish" against the whole solution, it tries to use the docker-compose.dcproj as if it were a .NET project and you get the error 'The SDK Microsoft.Docker.Sdk specified could not be found'

This issue is related to this issue/bug: https://github.com/dotnet/cli/issues/6178

WORKAROUND when using a Docker Linux build-container:

When trying to get the docker image (microsoft/aspnetcore-build) working see: https://github.com/aspnet/aspnet-docker/issues/299

Use the microsoft/aspnetcore-build:1.0-2.0 image that comes with the Microsoft.Docker.Sdk.

WORKAROUND until fixed, if using just .NET Core with NO Docker build-container:

Copy the Microsoft.Docker.Sdk folder from C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Sdks or C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Sdks if you are using the Enterprise version (Only the Sdk subfolder. Do not copy build and tools subfolders).

Then paste it on C:\Program Files\dotnet\sdk\2.0.0\Sdks on Windows or /usr/share/dotnet/sdk/2.0.0./Sdks on Linux (Ubuntu) Then dotnet build SolutionName.sln will work fine. These steps will fix both errors:

error MSB4236: The SDK 'Microsoft.Docker.Sdk' specified could not be found.

error MSB4022: The result "" of evaluating the value "$(DockerBuildTasksAssembly)" of the "AssemblyFile" attribute in element is not valid.

Clone this wiki locally