1

I want to publish my project using ABP to Ubuntu 16.04 with Docker, I'm still confused, where I put the dockerfile in abp project? maybe my dockerfile it's wrong,

Here my dockerfile:

FROM microsoft/dotnet:latest
COPY . /app
WORKDIR /app

RUN ["dotnet", "restore"]
RUN ["dotnet", "build"]

EXPOSE 5000/tcp
ENV ASPNETCORE_URLS http://*:5000
ENV ASPNETCORE_ENVIRONMENT docker

ENTRYPOINT ["dotnet", "run"]

I found that's code from the internet , Anyone can help me? I need an explanation so I can learn.

Vivek Nuna
  • 25,472
  • 25
  • 109
  • 197

1 Answers1

2

The easiest option is probably to use the built-in support in Visual Studio:

  1. Right-click your project
  2. Select Add | Docker Support
  3. Select "Linux"
  4. Click OK

This will add a project named "docker-compose" to your solution. You can either right-click this and select "build" to build a docker image of your project, or you can open a command prompt in your solution folder and run docker-compose build.

It will also generate a dockerfile in your project folder, which you can add any required environment variables, etc. to.

ProgrammingLlama
  • 36,677
  • 7
  • 67
  • 86