API Dockerfile update
parent
f237632aeb
commit
f84d90ddca
39
Notes.txt
39
Notes.txt
|
@ -10,48 +10,9 @@ Resources: https://github.com/nikeee/wake-on-lan
|
|||
Multiple Directory.Build.props:
|
||||
https://docs.microsoft.com/en-us/visualstudio/msbuild/customize-your-build?view=vs-2019
|
||||
|
||||
|
||||
#######################################################################################################################################################
|
||||
Azure DevOps Repository Password: ***REMOVED***
|
||||
#######################################################################################################################################################
|
||||
Docker commands:
|
||||
*****************
|
||||
Agent:
|
||||
*****************
|
||||
|
||||
Create image:
|
||||
--from solution folder:
|
||||
docker image build -t "network-resurrector-agent:1.0.0" -f "NetworkResurrector.Api/Dockerfile" .
|
||||
|
||||
Run image:
|
||||
docker run -p 5053:80 -it network-resurrector-agent:1.0.0
|
||||
|
||||
Push image to registry:
|
||||
--tag image
|
||||
docker tag network-resurrector-agent:1.0.0 cloud.canister.io:5000/tstanciu/network-resurrector:agent-1.0.0
|
||||
|
||||
--login to registry
|
||||
docker login --username=tstanciu --password="***REMOVED***" cloud.canister.io:5000
|
||||
|
||||
--push image
|
||||
docker push cloud.canister.io:5000/tstanciu/network-resurrector:agent-1.0.0
|
||||
|
||||
Pull image from registry
|
||||
--login to registry with readonly rights
|
||||
docker login --username=deploy+tstanciu --password=***REMOVED*** cloud.canister.io:5000
|
||||
|
||||
--pull image
|
||||
docker pull cloud.canister.io:5000/tstanciu/network-resurrector:agent-1.0.0
|
||||
|
||||
Run container in prod env
|
||||
docker run --restart=always -p 5008:80 -d cloud.canister.io:5000/tstanciu/network-resurrector:agent-1.0.0
|
||||
|
||||
Rename container
|
||||
docker rename <container_id> network-resurrector-agent
|
||||
#######################################################################################################################################################
|
||||
Docker container last version:
|
||||
- Agent: 1.0.0
|
||||
##############################################################################################
|
||||
|
||||
ORION
|
||||
***REMOVED***
|
||||
|
|
|
@ -14,7 +14,7 @@ COPY ["src/api/NetworkResurrector.Api.Application/NetworkResurrector.Api.Applica
|
|||
COPY ["src/api/NetworkResurrector.Api.Domain/NetworkResurrector.Api.Domain.csproj", "NetworkResurrector.Api.Domain/"]
|
||||
COPY ["src/api/NetworkResurrector.Api.Domain.Data/NetworkResurrector.Api.Domain.Data.csproj", "NetworkResurrector.Api.Domain.Data/"]
|
||||
RUN dotnet restore "NetworkResurrector.Api/NetworkResurrector.Api.csproj"
|
||||
COPY . .
|
||||
COPY src/api .
|
||||
WORKDIR "/src/NetworkResurrector.Api"
|
||||
RUN dotnet build "NetworkResurrector.Api.csproj" -c Release -o /app/build
|
||||
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
Docker commands:
|
||||
*****************
|
||||
|
||||
Create image:
|
||||
--from solution folder:
|
||||
docker image build -t "network-resurrector-api:1.0.0" -f "src/api/NetworkResurrector.Api/Dockerfile" .
|
||||
|
||||
Run image:
|
||||
docker run -p 5053:80 -it network-resurrector-agent:1.0.0
|
||||
|
||||
Push image to registry:
|
||||
--tag image
|
||||
docker tag network-resurrector-api:1.0.0 alpine-nexus:8500/network-resurrector/network-resurrector-api:1.0.0
|
||||
|
||||
--login to registry
|
||||
docker login --username=admin --password="***REMOVED***" alpine-nexus:8500
|
||||
|
||||
--push image
|
||||
docker push alpine-nexus:8500/network-resurrector/network-resurrector-api:1.0.0
|
||||
|
||||
Pull image from registry
|
||||
--login to registry
|
||||
|
||||
--pull image
|
||||
docker pull alpine-nexus:8500/network-resurrector/network-resurrector-api:1.0.0
|
||||
|
||||
Run container in prod env
|
||||
docker run -d --name network-resurrector-api --restart=always -p 5008:80 alpine-nexus:8500/network-resurrector/network-resurrector-api:1.0.0
|
||||
|
||||
Rename container
|
||||
docker rename <container_id> network-resurrector-api
|
||||
#######################################################################################################################################################
|
||||
Docker container last version: 1.0.0
|
||||
##############################################################################################
|
Loading…
Reference in New Issue