Compare commits

..

2 commits

2 changed files with 7 additions and 4 deletions

View file

@ -1,4 +1,4 @@
FROM golang:1.19-alpine as gobuild FROM golang:1.19-alpine AS gobuild
WORKDIR /build WORKDIR /build
ADD go.mod go.sum /build/ ADD go.mod go.sum /build/
@ -8,13 +8,16 @@ ADD pkg /build/pkg
RUN CGO_ENABLED=0 GOOS=linux go build -a -ldflags '-extldflags "-static"' -o ./s3driver ./cmd/s3driver RUN CGO_ENABLED=0 GOOS=linux go build -a -ldflags '-extldflags "-static"' -o ./s3driver ./cmd/s3driver
FROM alpine:3.17 FROM alpine:3.17
ARG BUILDARCH
LABEL maintainers="Vitaliy Filippov <vitalif@yourcmc.ru>" LABEL maintainers="Vitaliy Filippov <vitalif@yourcmc.ru>"
LABEL description="csi-s3 slim image" LABEL description="csi-s3 slim image"
RUN apk add --no-cache fuse mailcap rclone RUN apk add --no-cache fuse mailcap rclone
RUN apk add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/community s3fs-fuse 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-${BUILDARCH} /usr/bin/geesefs
RUN chmod 755 /usr/bin/geesefs RUN chmod 755 /usr/bin/geesefs
COPY --from=gobuild /build/s3driver /s3driver COPY --from=gobuild /build/s3driver /s3driver

View file

@ -13,7 +13,7 @@
# limitations under the License. # limitations under the License.
.PHONY: test build container push clean .PHONY: test build container push clean
REGISTRY_NAME=cr.yandex/crp9ftr22d26age3hulg REGISTRY_NAME=code.icb4dc0.de/infrastructure
REGISTRY_NAME2=cr.il.nebius.cloud/crll7us9n6i5j3v4n92m REGISTRY_NAME2=cr.il.nebius.cloud/crll7us9n6i5j3v4n92m
IMAGE_NAME=csi-s3 IMAGE_NAME=csi-s3
IMAGE_NAME2=yandex-cloud/csi-s3/csi-s3-driver IMAGE_NAME2=yandex-cloud/csi-s3/csi-s3-driver
@ -27,7 +27,7 @@ test:
docker build -t $(TEST_IMAGE_TAG) -f test/Dockerfile . docker build -t $(TEST_IMAGE_TAG) -f test/Dockerfile .
docker run --rm --privileged -v $(PWD):/build --device /dev/fuse $(TEST_IMAGE_TAG) docker run --rm --privileged -v $(PWD):/build --device /dev/fuse $(TEST_IMAGE_TAG)
container: container:
docker build -t $(IMAGE_TAG) . docker buildx build --push --platform linux/amd64,linux/arm64 -t $(IMAGE_TAG) .
push: container push: container
docker tag $(IMAGE_TAG) $(REGISTRY_NAME)/$(IMAGE_NAME):latest docker tag $(IMAGE_TAG) $(REGISTRY_NAME)/$(IMAGE_NAME):latest
docker tag $(IMAGE_TAG) $(REGISTRY_NAME)/$(IMAGE_NAME2):$(VERSION) docker tag $(IMAGE_TAG) $(REGISTRY_NAME)/$(IMAGE_NAME2):$(VERSION)