diff --git a/Dockerfile b/Dockerfile index 94f181a..6a84168 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,13 +8,16 @@ ADD pkg /build/pkg RUN CGO_ENABLED=0 GOOS=linux go build -a -ldflags '-extldflags "-static"' -o ./s3driver ./cmd/s3driver FROM alpine:3.17 + +ARG ARCH=amd64 + LABEL maintainers="Vitaliy Filippov " LABEL description="csi-s3 slim image" RUN apk add --no-cache fuse mailcap rclone RUN apk add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/community s3fs-fuse -ADD https://github.com/yandex-cloud/geesefs/releases/latest/download/geesefs-linux-amd64 /usr/bin/geesefs +ADD https://github.com/yandex-cloud/geesefs/releases/latest/download/geesefs-linux-${ARCH} /usr/bin/geesefs RUN chmod 755 /usr/bin/geesefs COPY --from=gobuild /build/s3driver /s3driver diff --git a/Makefile b/Makefile index 351b9e5..d0eadcb 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,7 @@ # limitations under the License. .PHONY: test build container push clean -REGISTRY_NAME=cr.yandex/crp9ftr22d26age3hulg +REGISTRY_NAME=code.icb4dc0.de/infrastructure REGISTRY_NAME2=cr.il.nebius.cloud/crll7us9n6i5j3v4n92m IMAGE_NAME=csi-s3 IMAGE_NAME2=yandex-cloud/csi-s3/csi-s3-driver @@ -27,7 +27,10 @@ test: docker build -t $(TEST_IMAGE_TAG) -f test/Dockerfile . docker run --rm --privileged -v $(PWD):/build --device /dev/fuse $(TEST_IMAGE_TAG) container: - docker build -t $(IMAGE_TAG) . + docker buildx build --build-arg ARCH=amd64 --push --platform linux/amd64 -t $(IMAGE_TAG)-amd64 . + docker buildx build --build-arg ARCH=arm64 --push --platform linux/arm64 -t $(IMAGE_TAG)-arm64 . + docker manifest create --amend $(IMAGE_TAG) $(IMAGE_TAG)-amd64 $(IMAGE_TAG)-arm64 + docker manifest push --purge $(IMAGE_TAG) push: container docker tag $(IMAGE_TAG) $(REGISTRY_NAME)/$(IMAGE_NAME):latest docker tag $(IMAGE_TAG) $(REGISTRY_NAME)/$(IMAGE_NAME2):$(VERSION)