Merge pull request #209 from digitalocean/update-dockerfile

update Go to 1.18 and Docker image to focal
This commit is contained in:
Kyle 2022-03-18 10:19:18 -07:00 committed by GitHub
commit e0d8ba4d6f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 8 deletions

View File

@ -30,7 +30,7 @@ jobs:
- uses: actions/setup-go@v2
with:
go-version: 1.17
go-version: 1.18
- name: Set up Ceph repository key
run: wget -q -O- 'https://download.ceph.com/keys/release.asc' | sudo apt-key add -

View File

@ -30,7 +30,7 @@ jobs:
- uses: actions/setup-go@v2
with:
go-version: 1.17
go-version: 1.18
# We only test the Ceph package since main depends on go-ceph
- name: Go test

View File

@ -1,4 +1,4 @@
FROM ubuntu:18.04 as builder
FROM ubuntu:20.04 as builder
MAINTAINER Vaibhav Bhembre <vaibhav@digitalocean.com>
ARG TEST
@ -12,14 +12,14 @@ RUN apt-get update && \
apt-get install -y apt-transport-https build-essential git curl wget
RUN wget -q -O- 'https://download.ceph.com/keys/release.asc' | apt-key add -
RUN echo "deb https://download.ceph.com/debian-nautilus bionic main" >> /etc/apt/sources.list
RUN echo "deb https://download.ceph.com/debian-nautilus focal main" >> /etc/apt/sources.list
RUN apt-get update && \
apt-get install -y --force-yes librados-dev librbd-dev
RUN \
mkdir -p /goroot && \
curl https://storage.googleapis.com/golang/go1.16.3.linux-amd64.tar.gz | tar xvzf - -C /goroot --strip-components=1
curl https://storage.googleapis.com/golang/go1.18.linux-amd64.tar.gz | tar xvzf - -C /goroot --strip-components=1
ADD . $APPLOC
WORKDIR $APPLOC
@ -29,13 +29,13 @@ RUN go get -d
RUN if [ -n "${TEST}" ]; then go test -tags nautilus -v -race -count=1 ./...; fi
RUN go build -tags nautilus -o /bin/ceph_exporter
FROM ubuntu:18.04
FROM ubuntu:20.04
MAINTAINER Vaibhav Bhembre <vaibhav@digitalocean.com>
RUN apt-get update && \
apt-get install -y apt-transport-https curl wget gnupg
RUN wget -q -O- 'https://download.ceph.com/keys/release.asc' | apt-key add -
RUN echo "deb https://download.ceph.com/debian-nautilus bionic main" >> /etc/apt/sources.list && \
RUN echo "deb https://download.ceph.com/debian-nautilus focal main" >> /etc/apt/sources.list && \
apt-get update && \
apt-get install -y --force-yes librados2 librbd1 ceph-common && \
rm -rf /var/lib/apt/lists/*

2
go.mod
View File

@ -1,6 +1,6 @@
module github.com/digitalocean/ceph_exporter
go 1.17
go 1.18
require (
github.com/Jeffail/gabs v1.4.0