Добавил публикацию на Docker Hub
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
12
.drone.yml
12
.drone.yml
@@ -1,6 +1,6 @@
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: "Build and test"
|
||||
name: "Backend"
|
||||
|
||||
steps:
|
||||
- name: test
|
||||
@@ -8,3 +8,13 @@ steps:
|
||||
commands:
|
||||
- dotnet build
|
||||
- dotnet test
|
||||
|
||||
- name: publish
|
||||
image: plugins/docker
|
||||
settings:
|
||||
username: prtsie
|
||||
password:
|
||||
from_secret: docker_pass
|
||||
repo: prtsie/schengen-visa
|
||||
tags:
|
||||
- latest
|
||||
|
||||
12
Dockerfile
Normal file
12
Dockerfile
Normal file
@@ -0,0 +1,12 @@
|
||||
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
|
||||
WORKDIR /src
|
||||
COPY . ./
|
||||
RUN dotnet restore
|
||||
RUN dotnet publish "SchengenVisaApi/SchengenVisaApi.csproj" -c Release -o /app/publish
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS runtime
|
||||
WORKDIR /app
|
||||
COPY --from=build /app/publish ./
|
||||
ENV ASPNETCORE_URLS=https://*:5000
|
||||
EXPOSE 5000
|
||||
ENTRYPOINT ["dotnet", "SchengenVisaApi.dll"]
|
||||
Reference in New Issue
Block a user