Skip to content

Commit 2175685

Browse files
dhi.io (#204)
* dhi.io * docker login dhi.io * docker login dhi.io * dependabot - dhi.io registry * docker login dhi.io
1 parent cf56ec9 commit 2175685

File tree

4 files changed

+42
-8
lines changed

4 files changed

+42
-8
lines changed

.github/dependabot.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
version: 2
2+
registries:
3+
dhi:
4+
type: docker-registry
5+
url: dhi.io
6+
username: ${{ secrets.DOCKER_USER }}
7+
password: ${{ secrets.DOCKER_PAT }}
28
updates:
39
- package-ecosystem: "github-actions"
410
directory: "/"
@@ -12,6 +18,8 @@ updates:
1218
directory: "/app/"
1319
schedule:
1420
interval: "daily"
21+
registries:
22+
- dhi
1523
groups:
1624
ci:
1725
patterns:

.github/workflows/open-pr.yml

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,16 @@ jobs:
2525
"containerd-snapshotter": true
2626
}
2727
}
28-
- name: docker login
28+
- name: docker login docker.io
2929
uses: docker/login-action@v3
3030
with:
31+
registry: docker.io
32+
username: ${{ secrets.DOCKER_USER }}
33+
password: ${{ secrets.DOCKER_PAT }}
34+
- name: docker login dhi.io
35+
uses: docker/login-action@v3
36+
with:
37+
registry: dhi.io
3138
username: ${{ secrets.DOCKER_USER }}
3239
password: ${{ secrets.DOCKER_PAT }}
3340
- name: Set up Docker Buildx
@@ -79,6 +86,12 @@ jobs:
7986
uses: docker/setup-qemu-action@v3
8087
- name: Set up Docker Buildx
8188
uses: docker/setup-buildx-action@v3
89+
- name: docker login dhi.io
90+
uses: docker/login-action@v3
91+
with:
92+
registry: dhi.io
93+
username: ${{ secrets.DOCKER_USER }}
94+
password: ${{ secrets.DOCKER_PAT }}
8295
- name: build container image in multi-arch
8396
uses: docker/build-push-action@v6
8497
with:
@@ -100,6 +113,12 @@ jobs:
100113
file: score-compose
101114
token: ${{ secrets.GITHUB_TOKEN }}
102115
version: ${{ env.SCORE_COMPOSE_VERSION }}
116+
- name: docker login dhi.io
117+
uses: docker/login-action@v3
118+
with:
119+
registry: dhi.io
120+
username: ${{ secrets.DOCKER_USER }}
121+
password: ${{ secrets.DOCKER_PAT }}
103122
- name: make compose.yaml
104123
run: |
105124
make compose.yaml
@@ -111,6 +130,12 @@ jobs:
111130
steps:
112131
- name: checkout code
113132
uses: actions/checkout@v6.0.1
133+
- name: docker login dhi.io
134+
uses: docker/login-action@v3
135+
with:
136+
registry: dhi.io
137+
username: ${{ secrets.DOCKER_USER }}
138+
password: ${{ secrets.DOCKER_PAT }}
114139
- name: docker build
115140
run: |
116141
docker build -t ${{ env.WORKLOAD_NAME }}:test app/

.github/workflows/push-tag.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@ jobs:
2626
ghcr.io \
2727
-u $ \
2828
--password-stdin
29+
- name: docker login dhi.io
30+
uses: docker/login-action@v3
31+
with:
32+
registry: dhi.io
33+
username: ${{ secrets.DOCKER_USER }}
34+
password: ${{ secrets.DOCKER_PAT }}
2935
- name: Build and push
3036
uses: docker/build-push-action@v6
3137
with:

app/Dockerfile

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
# https://mcr.microsoft.com/product/dotnet/sdk
2-
# https://mcr.microsoft.com/v2/dotnet/sdk/tags/list
3-
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:10.0.101-noble AS builder
1+
FROM --platform=$BUILDPLATFORM dhi.io/dotnet:10.0.101-sdk-alpine3.22 AS builder
42
ARG TARGETARCH
53
WORKDIR /app
64
COPY my-sample-app.csproj .
@@ -13,12 +11,9 @@ RUN dotnet publish my-sample-app.csproj \
1311
-o /my-sample-app \
1412
--no-restore
1513

16-
# https://mcr.microsoft.com/product/dotnet/runtime
17-
# https://mcr.microsoft.com/v2/dotnet/runtime/tags/list
18-
FROM mcr.microsoft.com/dotnet/runtime:10.0.1-noble-chiseled-extra
14+
FROM dhi.io/dotnet:10.0.1-alpine3.22
1915
WORKDIR /app
2016
COPY --from=builder /my-sample-app .
2117
EXPOSE 8080
2218
ENV ASPNETCORE_HTTP_PORTS=8080
23-
USER 65532
2419
ENTRYPOINT ["./my-sample-app"]

0 commit comments

Comments
 (0)