Skip to content

Commit 2715585

Browse files
authored
Merge pull request #158 from Sakuralbj/master
update blobfuseplugin base image with debian-base.
2 parents ee6737f + 878b2ee commit 2715585

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

pkg/blobfuseplugin/Dockerfile

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,20 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
FROM mcr.microsoft.com/aks/fundamental/base-ubuntu:v0.0.5
16-
RUN wget -O /tmp/packages-microsoft-prod.deb https://packages.microsoft.com/config/ubuntu/16.04/packages-microsoft-prod.deb
17-
RUN dpkg -i /tmp/packages-microsoft-prod.deb && apt-get update && apt-get install -y ca-certificates pkg-config libfuse-dev cmake libcurl4-gnutls-dev libgnutls28-dev uuid-dev libgcrypt20-dev blobfuse
15+
FROM golang:1.13.10-alpine3.10 as builder
16+
WORKDIR /go/src/sigs.k8s.io/blobfuse-csi-driver
17+
ADD . .
18+
ARG TARGETARCH
19+
ARG TARGETOS
20+
ARG LDFLAGS
21+
RUN CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH go build -a -ldflags "${LDFLAGS:--X sigs.k8s.io/blobfuse-csi-driver/pkg/blobfuse.driverVersion=latest}" -o _output/blobfuseplugin ./pkg/blobfuseplugin
22+
23+
FROM us.gcr.io/k8s-artifacts-prod/build-image/debian-base-amd64:v2.1.0
24+
COPY --from=builder /go/src/sigs.k8s.io/blobfuse-csi-driver/_output/blobfuseplugin /blobfuseplugin
25+
RUN apt-get update && clean-install ca-certificates pkg-config libfuse-dev cmake libcurl4-gnutls-dev libgnutls28-dev uuid-dev libgcrypt20-dev wget
26+
RUN wget -O /tmp/packages-microsoft-prod.deb https://packages.microsoft.com/config/ubuntu/16.04/packages-microsoft-prod.deb && dpkg -i /tmp/packages-microsoft-prod.deb && apt-get update && apt install blobfuse fuse -y && rm -f /tmp/packages-microsoft-prod.deb
27+
RUN apt remove wget -y
1828
LABEL maintainers="andyzhangx"
1929
LABEL description="Blobfuse CSI Driver"
2030

21-
COPY ./_output/blobfuseplugin /blobfuseplugin
2231
ENTRYPOINT ["/blobfuseplugin"]

0 commit comments

Comments
 (0)