Docker Dot Net Notes
Table of Contents
1. Publish to Docker Repository
1.1. Initial Setup
1.1.1. Don’t do this
|
Do not add Docker Support to the project! It is not necessary and doesn’t work properly anyway. |
1.1.2. Create a Publishing Profile
-
Right mouse click on the
Projectand select the Publish… menu item. -
Click the Add a publish profile link.
-
Select the Docker Container Registry
Targetand click Next. -
Select the Other Docker Container Registry
Targetand click Next. -
Set
TargetRegistry URL=https://docker.repo.xackleystudio.com -
Provide credentials and click Next
-
Select .NET SDK for
Container buildand click Finish -
Click Close
1.1.3. Create a Docker Compose File
-
Create a docker
compose.ymlfile like the following:version: '3.5' services: kestrel-my-site: container_name: My-Site image: 'docker.repo.xackleystudio.com/my-docker-image:latest' ports: - '8932:80' environment: - TZ=America/New_York - PUID=1000 - PGID=1000 volumes: - ./My-Site-data/logs:/app/logs restart: unless-stopped