From 07b2ab578d1516f8b010bd907044d1c247c2f02b Mon Sep 17 00:00:00 2001 From: Boris Glimcher Date: Thu, 13 Jun 2024 00:44:25 +0300 Subject: [PATCH] fix(server): remove docker image completely Signed-off-by: Boris Glimcher --- .github/workflows/sztp.yml | 33 --------------------------------- docker-compose.yml | 12 ++++++------ sztp-server/Dockerfile | 8 -------- 3 files changed, 6 insertions(+), 47 deletions(-) delete mode 100644 sztp-server/Dockerfile diff --git a/.github/workflows/sztp.yml b/.github/workflows/sztp.yml index a6ce5956..34502abb 100644 --- a/.github/workflows/sztp.yml +++ b/.github/workflows/sztp.yml @@ -11,39 +11,6 @@ on: jobs: - sztp-server-push: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: docker/setup-qemu-action@v3 - - uses: docker/setup-buildx-action@v3.0.0 - - - name: Log in to the GH Container registry - if: github.event_name != 'pull_request' - uses: docker/login-action@v3.0.0 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Extract Docker metadata - id: meta - uses: docker/metadata-action@v5.0.0 - with: - images: ghcr.io/${{ github.repository_owner }}/opi-sztp-server - - - name: Build and push Docker image - id: build-and-push - uses: docker/build-push-action@v5.0.0 - with: - context: sztp-server - platforms: linux/amd64,linux/arm64 - push: ${{ github.event_name != 'pull_request' }} - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} - cache-from: type=gha - cache-to: type=gha,mode=max - sztp-client-push: runs-on: ubuntu-latest steps: diff --git a/docker-compose.yml b/docker-compose.yml index 13cf0a0c..1d7284e5 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -6,9 +6,7 @@ version: '3.7' services: bootstrap: - image: ghcr.io/opiproject/opi-sztp-server:main - build: - context: sztp-server + image: docker.io/opiproject/sztpd:0.0.15 depends_on: setup-cert: condition: service_completed_successfully @@ -16,6 +14,8 @@ services: - server-certs:/certs - ./sztp-server/images:/media - ./sztp-server/config:/mnt + - ./sztp-server/docker-entrypoint.sh:/usr/local/bin/docker-entrypoint.sh + entrypoint: /usr/local/bin/docker-entrypoint.sh environment: SZTPD_INIT_PORT: 6080 SZTPD_NBI_PORT: 7080 @@ -34,15 +34,15 @@ services: test: ["CMD-SHELL", "curl --fail -H Accept:application/yang-data+json http://127.0.0.1:$$SZTPD_NBI_PORT/.well-known/host-meta || exit 1"] redirecter: - image: ghcr.io/opiproject/opi-sztp-server:main - build: - context: sztp-server + image: docker.io/opiproject/sztpd:0.0.15 depends_on: setup-cert: condition: service_completed_successfully volumes: - server-certs:/certs - ./sztp-server/config/sztpd.redirect.json.template:/mnt/sztpd.redirect.json.template + - ./sztp-server/docker-entrypoint.sh:/usr/local/bin/docker-entrypoint.sh + entrypoint: /usr/local/bin/docker-entrypoint.sh environment: SZTPD_INIT_PORT: 6080 SZTPD_NBI_PORT: 7070 diff --git a/sztp-server/Dockerfile b/sztp-server/Dockerfile deleted file mode 100644 index ca4ba29d..00000000 --- a/sztp-server/Dockerfile +++ /dev/null @@ -1,8 +0,0 @@ -# SPDX-License-Identifier: Apache-2.0 -# Copyright (c) 2022 Dell Inc, or its subsidiaries. - -FROM ghcr.io/opiproject/sztpd:main@sha256:3486f2ae45bb2535d86bc03aa63cc520ad8b556960cc69b309f8320e01e59653 -COPY docker-entrypoint.sh /usr/local/bin/ -RUN chmod +x /usr/local/bin/docker-entrypoint.sh -ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"] -HEALTHCHECK CMD curl --fail -H Accept:application/yang-data+json http://127.0.0.1:$SZTPD_NBI_PORT/.well-known/host-meta || exit 1