From 25c47ab4bab2ce3c99d05eb6a255852f8548a9a9 Mon Sep 17 00:00:00 2001 From: aalu1418 <50029043+aalu1418@users.noreply.github.com> Date: Wed, 24 Apr 2024 11:48:45 -0600 Subject: [PATCH] fix docker go version --- .github/workflows/monitoring.yml | 22 ++++++++++++++++++++++ ops/monitoring/Dockerfile | 9 +-------- 2 files changed, 23 insertions(+), 8 deletions(-) create mode 100644 .github/workflows/monitoring.yml diff --git a/.github/workflows/monitoring.yml b/.github/workflows/monitoring.yml new file mode 100644 index 000000000..a848182af --- /dev/null +++ b/.github/workflows/monitoring.yml @@ -0,0 +1,22 @@ +name: "Compile SOM" + +on: + push: + branches: + - develop + paths: + - monitoring/** + - relayer/** + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + + - name: Setup Docker Buildx + uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v3.3.0 + + - name: Docker Buildx Build + run: docker buildx build --file ops/monitoring/Dockerfile ./ diff --git a/ops/monitoring/Dockerfile b/ops/monitoring/Dockerfile index cd32d5b30..04c18a155 100644 --- a/ops/monitoring/Dockerfile +++ b/ops/monitoring/Dockerfile @@ -1,6 +1,6 @@ # Build image -FROM ubuntu:20.04 AS build +FROM golang:1.21.5 AS build # OS dependencies RUN apt-get update && apt-get install -y wget gcc @@ -13,13 +13,6 @@ COPY ./pkg /solana-monitoring/pkg COPY ./go.mod /solana-monitoring/ COPY ./go.sum /solana-monitoring/ -# Install golang - -RUN wget -c https://dl.google.com/go/go1.18.1.linux-amd64.tar.gz -O - \ - | tar -xz -C /usr/local \ - && mkdir -p /go/src /go/bin -ENV PATH /usr/local/go/bin:$PATH - # Compile binary WORKDIR /solana-monitoring