Skip to content

Custom ENTRYPOINT ignored by VS2017 when using docker-compose #9

@oleksii-udovychenko

Description

@oleksii-udovychenko

Introduction

I've tried to launch supervisord in a container to run both webpack-dev-server and .NET Core Web App at the same time (for development purposes).

I've created the following Dockerfile:

FROM microsoft/aspnetcore:1.1

(... omitted for brevity ...)

ENTRYPOINT ["supervisord"]

and the following supervisord.conf file:

[supervisord]
nodaemon=true

(... omitted for brevity ...)

[program:frontend]
command=/bin/bash -c "cd wwwroot && npm start"

[program:backend]
command=/bin/bash -c "dotnet App.dll"

When I hit F5, I see that supervisor doesn't start, so frontend and backend apps shouldn't start. The weird thing is that my App.dll starts successfuly. When I started supervisor manually from the container itself, I noticed that backend (which is my App.dll) can't be started (because it is already running), but frontend works fine:

image

After few more tries I realized that VS2017 starts my app behind the scenes and ignores my ENTRYPOINT because docker-compose.vs.debug.yml overrides the ENTRYPOINT with the following command:

entrypoint: tail -f /dev/null

Changing entrypoint in docker-compose.vs.debug.yml doesn't help, it seems that tail -f /dev/null command is required.

Problem

The problem is that I can't find where and how my app starts. Also, it would be great to know a way to change default VS2017 behavior, so I can stop VS2017 from launching my app and launch supervisord instead.

Maybe I am missing something?

I was able to isolate and reproduce this issue(?).

Steps to reproduce

  1. Create a new solution using standard "Console App (.NET Core)" template
  2. Right-click on a new console app and select "Add => Docker Support"
  3. Open Dockerfile and change ENTRYPOINT to something that should cause an error.
FROM microsoft/dotnet:1.1-runtime
ARG source
WORKDIR /app
COPY ${source:-obj/Docker/publish} .
ENTRYPOINT ["DOESNOTEXIST"]
  1. Hit F5

EXPECTED RESULT: Console app doesn't start.

ACTUAL RESULT:
image

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions