Skip to content

Commit

Permalink
Merge 878b2ee into ee6737f
Browse files Browse the repository at this point in the history
  • Loading branch information
Sakuralbj committed Jul 6, 2020
2 parents ee6737f + 878b2ee commit 929bb1c
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions pkg/blobfuseplugin/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,20 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM mcr.microsoft.com/aks/fundamental/base-ubuntu:v0.0.5
RUN wget -O /tmp/packages-microsoft-prod.deb https://packages.microsoft.com/config/ubuntu/16.04/packages-microsoft-prod.deb
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
FROM golang:1.13.10-alpine3.10 as builder
WORKDIR /go/src/sigs.k8s.io/blobfuse-csi-driver
ADD . .
ARG TARGETARCH
ARG TARGETOS
ARG LDFLAGS
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

FROM us.gcr.io/k8s-artifacts-prod/build-image/debian-base-amd64:v2.1.0
COPY --from=builder /go/src/sigs.k8s.io/blobfuse-csi-driver/_output/blobfuseplugin /blobfuseplugin
RUN apt-get update && clean-install ca-certificates pkg-config libfuse-dev cmake libcurl4-gnutls-dev libgnutls28-dev uuid-dev libgcrypt20-dev wget
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
RUN apt remove wget -y
LABEL maintainers="andyzhangx"
LABEL description="Blobfuse CSI Driver"

COPY ./_output/blobfuseplugin /blobfuseplugin
ENTRYPOINT ["/blobfuseplugin"]

0 comments on commit 929bb1c

Please sign in to comment.