Skip to content

Commit e97d3d3

Browse files
committed
Try to make main containers build
1 parent fc72e6b commit e97d3d3

File tree

16 files changed

+67
-67
lines changed

16 files changed

+67
-67
lines changed

.github/workflows/build-containers.yml

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,49 @@ jobs:
3737
- name: Build and push
3838
uses: docker/build-push-action@v6
3939
with:
40-
context: make/photon/${{ matrix.container }}
40+
context: .
4141
file: make/photon/${{ matrix.container }}/Dockerfile.base
4242
push: true
4343
tags: harbor.nirvati.org/registry/${{ matrix.container }}-base:latest
44+
45+
build-main:
46+
name: Build main images
47+
runs-on:
48+
- ubuntu-24.04
49+
needs: build-base
50+
strategy:
51+
matrix:
52+
container: [core, db, exporter, jobservice, log, nginx, portal, prepare, redis, registryctl, registry, standalone-db-migrator, trivy-adapter]
53+
steps:
54+
- uses: actions/checkout@v4
55+
56+
- name: Set up Go 1.23
57+
uses: actions/setup-go@v5
58+
with:
59+
go-version: 1.23.2
60+
- uses: docker/login-action@v3
61+
with:
62+
registry: harbor.nirvati.org
63+
username: ${{ secrets.REGISTRY_USERNAME }}
64+
password: ${{ secrets.REGISTRY_PASSWORD }}
65+
66+
- name: Set up Docker Buildx
67+
uses: docker/setup-buildx-action@v3
68+
69+
- name: Check out copy to subdirectory for go
70+
uses: actions/checkout@v4
71+
with:
72+
path: src/github.com/goharbor/harbor
73+
74+
- name: Build binaries
75+
if: ${{ matrix.container == 'registry' || matrix.container == 'trivy-adapter' }}
76+
run: |
77+
./make/photon/${matrix.container}/builder
78+
79+
- name: Build and push
80+
uses: docker/build-push-action@v6
81+
with:
82+
context: .
83+
file: make/photon/${{ matrix.container }}/Dockerfile
84+
push: true
85+
tags: harbor.nirvati.org/registry/${{ matrix.container }}:latest

make/photon/core/Dockerfile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
ARG harbor_base_image_version
2-
ARG harbor_base_namespace
3-
FROM ${harbor_base_namespace}/harbor-core-base:${harbor_base_image_version}
1+
FROM harbor.nirvati.org/registry/core-base:latest
42

53
HEALTHCHECK CMD curl --fail -s http://localhost:8080/api/v2.0/ping || curl -k --fail -s https://localhost:8443/api/v2.0/ping || exit 1
64
COPY ./make/photon/common/install_cert.sh /harbor/

make/photon/db/Dockerfile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
ARG harbor_base_image_version
2-
ARG harbor_base_namespace
3-
FROM ${harbor_base_namespace}/harbor-db-base:${harbor_base_image_version}
1+
FROM harbor.nirvati.org/registry/db-base:latest
42

53
VOLUME /var/lib/postgresql/data
64

make/photon/exporter/Dockerfile

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
1-
ARG build_image
2-
ARG harbor_base_image_version
3-
ARG harbor_base_namespace
4-
5-
FROM ${build_image} AS build
1+
FROM golang:1.23.12 AS build
62

73
ENV CGO_ENABLED=0
84
ENV GOOS=linux
@@ -12,7 +8,7 @@ COPY src /harbor/src
128
WORKDIR /harbor/src/cmd/exporter
139
RUN go build -o /out/harbor_exporter
1410

15-
FROM ${harbor_base_namespace}/harbor-exporter-base:${harbor_base_image_version}
11+
FROM harbor.nirvati.org/registry/exporter-base:latest
1612

1713
COPY --from=build /out/harbor_exporter /harbor/harbor_exporter
1814
COPY ./make/photon/exporter/entrypoint.sh ./make/photon/common/install_cert.sh /harbor/

make/photon/jobservice/Dockerfile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
ARG harbor_base_image_version
2-
ARG harbor_base_namespace
3-
FROM ${harbor_base_namespace}/harbor-jobservice-base:${harbor_base_image_version}
1+
FROM harbor.nirvati.org/registry/jobservice-base:latest
42

53
COPY ./make/photon/common/install_cert.sh /harbor/
64
COPY ./make/photon/jobservice/entrypoint.sh /harbor/

make/photon/log/Dockerfile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
ARG harbor_base_image_version
2-
ARG harbor_base_namespace
3-
FROM ${harbor_base_namespace}/harbor-log-base:${harbor_base_image_version}
1+
FROM harbor.nirvati.org/registry/log-base:latest
42

53
COPY ./make/photon/log/rsyslog.conf /etc/rsyslog.conf
64

make/photon/nginx/Dockerfile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
ARG harbor_base_image_version
2-
ARG harbor_base_namespace
3-
FROM ${harbor_base_namespace}/harbor-nginx-base:${harbor_base_image_version}
1+
FROM harbor.nirvati.org/registry/nginx-base:latest
42

53
VOLUME /var/cache/nginx /var/log/nginx /run
64

make/photon/portal/Dockerfile

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
ARG harbor_base_image_version
2-
ARG harbor_base_namespace
3-
ARG NODE
4-
FROM ${NODE} as nodeportal
1+
FROM node:24.5.0 as nodeportal
52

63
WORKDIR /build_dir
74

@@ -22,7 +19,7 @@ COPY ./LICENSE /build_dir/dist
2219
RUN cd app-swagger-ui && npm install --unsafe-perm
2320
RUN cd app-swagger-ui && npm run build
2421

25-
FROM ${harbor_base_namespace}/harbor-portal-base:${harbor_base_image_version}
22+
FROM harbor.nirvati.org/registry/portal-base:latest
2623

2724
COPY --from=nodeportal /build_dir/dist /usr/share/nginx/html
2825
COPY --from=nodeportal /build_dir/swagger.json /usr/share/nginx/html

make/photon/prepare/Dockerfile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
ARG harbor_base_image_version
2-
ARG harbor_base_namespace
3-
FROM ${harbor_base_namespace}/harbor-prepare-base:${harbor_base_image_version}
1+
FROM harbor.nirvati.org/registry/prepare-base:latest
42

53
ENV LANG en_US.UTF-8
64

make/photon/redis/Dockerfile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
ARG harbor_base_image_version
2-
ARG harbor_base_namespace
3-
FROM ${harbor_base_namespace}/harbor-redis-base:${harbor_base_image_version}
1+
FROM harbor.nirvati.org/registry/redis-base:latest
42

53
VOLUME /var/lib/redis
64
WORKDIR /var/lib/redis

0 commit comments

Comments
 (0)