Skip to content

Commit

Permalink
Updating dockerfile for CSI NFS
Browse files Browse the repository at this point in the history
Signed-off-by: SRIKUMAR VENUGOPAL <[email protected]>
  • Loading branch information
srikumar003 committed Nov 20, 2024
1 parent 15fb46b commit d5e9595
Show file tree
Hide file tree
Showing 3,502 changed files with 8 additions and 1,441,840 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
21 changes: 3 additions & 18 deletions src/csi-driver-nfs/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,24 +1,9 @@
FROM ubuntu:20.04 as base
FROM golang:1.22-bookworm as base
RUN apt-get update && \
apt-get install -y \
git wget gcc make mercurial && \
rm -rf /var/lib/apt/lists/*

ARG TARGETARCH
ENV ARCH=$TARGETARCH
ENV GO_VERSION=1.19

RUN echo $ARCH $GO_VERSION

RUN wget -q https://dl.google.com/go/go$GO_VERSION.linux-$ARCH.tar.gz && \
tar -xf go$GO_VERSION.linux-$ARCH.tar.gz && \
rm go$GO_VERSION.linux-$ARCH.tar.gz && \
mv go /usr/local

ENV GOROOT /usr/local/go
ENV GOPATH /go
ENV PATH=$GOPATH/bin:$GOROOT/bin:$PATH
ENV GOARCH $ARCH
ENV GO111MODULE=on

COPY go.mod .
Expand All @@ -30,11 +15,11 @@ WORKDIR /csi-driver-nfs
RUN mkdir -p /bin
RUN CGO_ENABLED=0 GOOS=linux go build -a -ldflags '-X main.version=$(REV) -extldflags "-static"' -o /bin/nfsplugin /csi-driver-nfs/cmd/nfsplugin

FROM centos:7
FROM mirror.gcr.io/debian:bookworm-slim

# Copy nfsplugin from build _output directory
COPY --from=base /bin/nfsplugin /nfsplugin

RUN yum -y install nfs-utils && yum -y install epel-release && yum -y install jq && yum clean all
RUN apt-get update && apt-get -y install nfs-common && apt-get -y install jq && apt-get clean all

ENTRYPOINT ["/nfsplugin"]
38 changes: 0 additions & 38 deletions src/csi-driver-nfs/cmd/tests/nfs-e2e.go

This file was deleted.

32 changes: 4 additions & 28 deletions src/csi-driver-nfs/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,40 +3,16 @@ module csi-driver-nfs
go 1.12

require (
github.com/PuerkitoBio/purell v1.1.1 // indirect
github.com/beorn7/perks v1.0.0 // indirect
github.com/container-storage-interface/spec v1.1.0
github.com/docker/distribution v2.8.2+incompatible // indirect
github.com/docker/spdystream v0.0.0-20181023171402-6480d4af844c // indirect
github.com/emicklei/go-restful v2.16.0+incompatible // indirect
github.com/fatih/camelcase v1.0.0 // indirect
github.com/go-openapi/spec v0.19.0 // indirect
github.com/go-openapi/swag v0.19.0 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/glog v1.1.0
github.com/googleapis/gnostic v0.2.0 // indirect
github.com/gregjones/httpcache v0.0.0-20190212212710-3befbb6ad0cc // indirect
github.com/imdario/mergo v0.3.7 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/kubernetes-csi/csi-lib-utils v0.2.0
github.com/mailru/easyjson v0.0.0-20190403194419-1ea4449da983 // indirect
github.com/onsi/ginkgo v1.8.0
github.com/onsi/gomega v1.5.0
github.com/opencontainers/go-digest v1.0.0-rc1 // indirect
github.com/prometheus/common v0.3.0 // indirect
github.com/prometheus/procfs v0.0.0-20190412120340-e22ddced7142 // indirect
github.com/spf13/cobra v0.0.3
github.com/spf13/pflag v1.0.3 // indirect
golang.org/x/net v0.23.0
google.golang.org/genproto v0.0.0-20230711160842-782d3b101e98 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 // indirect
google.golang.org/grpc v1.56.3
google.golang.org/grpc/examples v0.0.0-20230728181735-20c51a9f425d // indirect
gopkg.in/square/go-jose.v2 v2.3.1 // indirect
k8s.io/api v0.0.0-20190415132514-c2f1300cac21
k8s.io/apiextensions-apiserver v0.0.0-20190315093550-53c4693659ed // indirect
k8s.io/apimachinery v0.16.13
k8s.io/cli-runtime v0.0.0-20190415133733-52015cbe156a // indirect
k8s.io/cluster-bootstrap v0.0.0-20190415134033-d885a12fbbe4 // indirect
k8s.io/csi-translation-lib v0.0.0-20190415134207-82f1dfd98d10 // indirect
k8s.io/kube-aggregator v0.0.0-20190415133304-80ce4e5a0cbc // indirect
k8s.io/apimachinery v0.16.13 // indirect
k8s.io/kubernetes v1.14.1
k8s.io/utils v0.0.0-20200124190032-861946025e34 // indirect
)
Loading

0 comments on commit d5e9595

Please sign in to comment.