diff --git a/.github/workflows/push-node-status-agent.yaml b/.github/workflows/push-node-status-agent.yaml index a66d4dee41..7461d6bc11 100644 --- a/.github/workflows/push-node-status-agent.yaml +++ b/.github/workflows/push-node-status-agent.yaml @@ -2,6 +2,10 @@ name: Build and upload Node Status agent container to harbor.nymte.ch on: workflow_dispatch: + inputs: + gateway_probe_git_ref: + type: string + description: Which gateway probe git ref to build the image with env: WORKING_DIRECTORY: "nym-node-status-agent" @@ -52,5 +56,5 @@ jobs: - name: BuildAndPushImageOnHarbor run: | - docker build -f ${{ env.WORKING_DIRECTORY }}/Dockerfile . -t harbor.nymte.ch/nym/${{ env.CONTAINER_NAME }}:${{ steps.get_version.outputs.result }} -t harbor.nymte.ch/nym/${{ env.CONTAINER_NAME }}:latest + docker build --build-arg GIT_REF=${{ github.event.inputs.gateway_probe_git_ref }} -f ${{ env.WORKING_DIRECTORY }}/Dockerfile . -t harbor.nymte.ch/nym/${{ env.CONTAINER_NAME }}:${{ steps.get_version.outputs.result }}-${{ github.event.inputs.gateway_probe_git_ref }} -t harbor.nymte.ch/nym/${{ env.CONTAINER_NAME }}:latest docker push harbor.nymte.ch/nym/${{ env.CONTAINER_NAME }} --all-tags diff --git a/nym-node-status-agent/Dockerfile b/nym-node-status-agent/Dockerfile index a6653e6f79..76368e08fa 100644 --- a/nym-node-status-agent/Dockerfile +++ b/nym-node-status-agent/Dockerfile @@ -1,5 +1,11 @@ FROM rust:latest AS builder +ARG GIT_REF=main + +RUN echo "Acquire::http::Pipeline-Depth 0;" > /etc/apt/apt.conf.d/99custom && \ + echo "Acquire::http::No-Cache true;" >> /etc/apt/apt.conf.d/99custom && \ + echo "Acquire::BrokenProxy true;" >> /etc/apt/apt.conf.d/99custom + RUN apt update && apt install -yy libdbus-1-dev pkg-config libclang-dev # Install go @@ -7,6 +13,7 @@ RUN wget https://go.dev/dl/go1.22.5.linux-amd64.tar.gz -O go.tar.gz RUN tar -xzvf go.tar.gz -C /usr/local RUN git clone https://github.com/nymtech/nym-vpn-client /usr/src/nym-vpn-client +RUN cd /usr/src/nym-vpn-client && git checkout $GIT_REF ENV PATH=/go/bin:/usr/local/go/bin:$PATH WORKDIR /usr/src/nym-vpn-client/nym-vpn-core RUN cargo build --release --package nym-gateway-probe