Skip to main content

One for all

··1 min Draft

Plan:

Introduction / Rationale behind the whole hassle #

Setup the scene: tools, stack, etc. #

Target process #

Key configuration files #

1
2
3
4
5
6
7
8
9
# This image is based on vanilla SDK image from MS
# REGISTRY[:PORT]/REPOSITORY[:TAG[-FAMILY]]
FROM REGISTRY/sdk:8.0-alpine

# Install Docker and SQLite binaries
RUN apk add docker sqlite

# Install dotnet tooling 'dotnet-affected' globally
RUN dotnet tool install -g dotnet-affected

A lot of text in the middle

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
# This image is based on the previous one
# REGISTRY[:PORT]/REPOSITORY[:TAG[-FAMILY]]
FROM REGISTRY/sdk-docker:0.0.1-alpine

# Copy src into the repo root dir
WORKDIR /repo-root

COPY . /repo-root

# Add the registry's CA certificate (Let's Encrypt)
COPY cicd/e5.crt /usr/local/share/ca-certificates/e5.crt
RUN cat /usr/local/share/ca-certificates/e5.crt >> \
    /etc/ssl/certs/ca-certificates.crt

# Authorize with the registry
RUN docker login -u token -p password REGISTRY

# Publish the affected apps
RUN dotnet publish affected.proj /v:n \
    /p:EnableSdkContainerSupport=true \
    /p:isPublishable=true

Step by step setup #

Wrap-up #