chore: build arm image
This commit is contained in:
parent
25401592e1
commit
f43d01bbd5
2 changed files with 9 additions and 3 deletions
|
@ -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 ARCH=amd64
|
||||||
|
|
||||||
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-${ARCH} /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
|
||||||
|
|
7
Makefile
7
Makefile
|
@ -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,10 @@ 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 --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
|
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)
|
||||||
|
|
Loading…
Reference in a new issue