mirror of
https://git.netzspielplatz.de/docker-multiarch/minio.git
synced 2025-11-08 20:19:24 +00:00
Compare commits
31 commits
| Author | SHA1 | Date | |
|---|---|---|---|
| e04ff0de31 | |||
|
|
773a54100c | ||
| 7df6fc28ff | |||
|
|
721240018a | ||
| e603ab2f2d | |||
|
|
01b5a431d7 | ||
| 1fc9cd8b3e | |||
| cc06145256 | |||
| dc69f4a6f4 | |||
| af91e01939 | |||
| 0906c14ba9 | |||
| ef94273ee6 | |||
| a9a5f6cb75 | |||
| a1c4e8f001 | |||
| fff395c3aa | |||
| 98bf3f9c8a | |||
| ce0a2455fa | |||
| 5efa0b15b2 | |||
| 7365715b11 | |||
| 40279c8377 | |||
| f9e9c4ec71 | |||
| 222b33ed62 | |||
| 74fda793ec | |||
| 89ddb40b07 | |||
| 6ae2db23fe | |||
| a686da6b42 | |||
| 9460a7b4db | |||
| 46c69f55a6 | |||
|
|
79e14321b2 | ||
|
|
20ddde3b63 | ||
|
|
c10276e788 |
3 changed files with 40 additions and 94 deletions
106
.gitlab-ci.yml
106
.gitlab-ci.yml
|
|
@ -1,87 +1,31 @@
|
||||||
# Credit -> https://stackoverflow.com/questions/58600986/gitlab-ci-trying-to-use-docker-buildx-to-build-for-arm64
|
image: egon0/docker-with-buildx-and-git:latest
|
||||||
|
|
||||||
stages:
|
variables:
|
||||||
- buildx
|
DOCKER_HOST: tcp://docker:2375/
|
||||||
- deploy
|
DOCKER_DRIVER: overlay2
|
||||||
- Weekly buildx
|
DOCKER_TLS_CERTDIR: ""
|
||||||
- Weekly deploy
|
|
||||||
|
|
||||||
# ----- Ad hoc Builds -----
|
services:
|
||||||
|
- docker:dind
|
||||||
|
|
||||||
buildx:
|
build:
|
||||||
image: docker:19.03-git
|
stage: build
|
||||||
stage: buildx
|
|
||||||
variables:
|
variables:
|
||||||
GIT_STRATEGY: none
|
IMAGE_TAG: $CI_REGISTRY_IMAGE
|
||||||
artifacts:
|
D_IMAGE_TAG: egon0/minio-multiarch
|
||||||
paths:
|
D_LATEST_TAG: egon0/minio-multiarch:latest
|
||||||
- buildx
|
|
||||||
expire_in: 3 hour
|
|
||||||
services:
|
|
||||||
- docker:19.03-dind
|
|
||||||
script:
|
script:
|
||||||
- export DOCKER_BUILDKIT=1
|
- >
|
||||||
- git clone git://github.com/docker/buildx ./docker-buildx
|
apk add --no-cache jq;
|
||||||
- docker build --platform=local -o . ./docker-buildx
|
LATEST_MINIO_GITHUB=$(wget --quiet "https://api.github.com/repos/minio/minio/releases/latest" -O - | jq -r '.tag_name');
|
||||||
only:
|
LATEST_MINIO_DHUB=$(wget -q https://registry.hub.docker.com/v1/repositories/egon0/minio-multiarch/tags -O - | sed -e 's/[][]//g' -e 's/"//g' -e 's/ //g' | tr '}' '\n' | awk -F: '{print $3}' | tail -n1);
|
||||||
changes:
|
if [ "$LATEST_MINIO_GITHUB" != "$LATEST_MINIO_DHUB" ]
|
||||||
- Dockerfile
|
then
|
||||||
- .gitlab-ci.yml
|
docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
|
||||||
|
docker login -u $DOCKER_LOGIN -p $DOCKER_PASSWORD
|
||||||
|
docker buildx create --use --name A$CI_COMMIT_SHORT_SHA
|
||||||
|
docker buildx build --platform $BUILD_PLATFORMS --push -t $IMAGE_TAG:$LATEST_MINIO_GITHUB -t $CI_REGISTRY_IMAGE:latest -t $D_IMAGE_TAG:$LATEST_MINIO_GITHUB -t $D_LATEST_TAG .
|
||||||
|
else
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
deploy:
|
|
||||||
image: docker:19.03
|
|
||||||
stage: deploy
|
|
||||||
services:
|
|
||||||
- name: docker:19.03-dind
|
|
||||||
command: ["--experimental"]
|
|
||||||
before_script:
|
|
||||||
- mkdir -p ~/.docker/cli-plugins
|
|
||||||
- mv buildx ~/.docker/cli-plugins/docker-buildx
|
|
||||||
- docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
|
|
||||||
script:
|
|
||||||
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
|
|
||||||
- docker buildx create --use --name mybuilder
|
|
||||||
- docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 --push -t $CI_REGISTRY_IMAGE .
|
|
||||||
only:
|
|
||||||
changes:
|
|
||||||
- Dockerfile
|
|
||||||
- .gitlab-ci.yml
|
|
||||||
|
|
||||||
# ----- Weekly Build -----
|
|
||||||
|
|
||||||
weekly:buildx:
|
|
||||||
image: docker:19.03-git
|
|
||||||
stage: Weekly buildx
|
|
||||||
variables:
|
|
||||||
GIT_STRATEGY: none
|
|
||||||
artifacts:
|
|
||||||
paths:
|
|
||||||
- buildx
|
|
||||||
expire_in: 3 hour
|
|
||||||
services:
|
|
||||||
- docker:19.03-dind
|
|
||||||
script:
|
|
||||||
- export DOCKER_BUILDKIT=1
|
|
||||||
- git clone git://github.com/docker/buildx ./docker-buildx
|
|
||||||
- docker build --platform=local -o . ./docker-buildx
|
|
||||||
only:
|
|
||||||
- schedules
|
|
||||||
- master
|
|
||||||
|
|
||||||
weekly:deploy:
|
|
||||||
image: docker:19.03
|
|
||||||
stage: Weekly deploy
|
|
||||||
services:
|
|
||||||
- name: docker:19.03-dind
|
|
||||||
command: ["--experimental"]
|
|
||||||
before_script:
|
|
||||||
- mkdir -p ~/.docker/cli-plugins
|
|
||||||
- mv buildx ~/.docker/cli-plugins/docker-buildx
|
|
||||||
- docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
|
|
||||||
script:
|
|
||||||
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
|
|
||||||
- docker buildx create --use --name mybuilder
|
|
||||||
- docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 --push -t $CI_REGISTRY_IMAGE .
|
|
||||||
only:
|
|
||||||
- schedules
|
|
||||||
- master
|
|
||||||
25
Dockerfile
25
Dockerfile
|
|
@ -1,20 +1,19 @@
|
||||||
#Pulled from: https://hub.docker.com/r/minio/minio/dockerfile
|
FROM golang:1.18-alpine as builder
|
||||||
|
|
||||||
FROM golang:1.13-alpine
|
|
||||||
|
|
||||||
LABEL maintainer="Kelly Hair <khair@gitlab.com>"
|
|
||||||
|
|
||||||
|
LABEL maintainer="MinIO Inc <dev@min.io>"
|
||||||
|
|
||||||
ENV GOPATH /go
|
ENV GOPATH /go
|
||||||
ENV CGO_ENABLED 0
|
ENV CGO_ENABLED 0
|
||||||
ENV GO111MODULE on
|
ENV GO111MODULE on
|
||||||
|
|
||||||
RUN \
|
RUN \
|
||||||
apk add --no-cache git && \
|
apk add --no-cache git jq && \
|
||||||
git clone https://github.com/minio/minio && cd minio && \
|
git config --global advice.detachedHead false && \
|
||||||
go install -v -ldflags "$(go run buildscripts/gen-ldflags.go)"
|
LATEST_MINIO_GITHUB=$(wget --quiet "https://api.github.com/repos/minio/minio/releases/latest" -O - | jq -r '.tag_name'); \
|
||||||
|
git clone https://github.com/minio/minio && cd minio && \
|
||||||
|
git checkout "$LATEST_MINIO_GITHUB" && go install -v -ldflags "$(go run buildscripts/gen-ldflags.go)"
|
||||||
|
|
||||||
FROM alpine:3.10
|
FROM alpine:3.16
|
||||||
|
|
||||||
ENV MINIO_UPDATE off
|
ENV MINIO_UPDATE off
|
||||||
ENV MINIO_ACCESS_KEY_FILE=access_key \
|
ENV MINIO_ACCESS_KEY_FILE=access_key \
|
||||||
|
|
@ -24,9 +23,9 @@ ENV MINIO_ACCESS_KEY_FILE=access_key \
|
||||||
|
|
||||||
EXPOSE 9000
|
EXPOSE 9000
|
||||||
|
|
||||||
COPY --from=0 /go/bin/minio /usr/bin/minio
|
COPY --from=builder /go/bin/minio /usr/bin/minio
|
||||||
COPY --from=0 /go/minio/CREDITS /third_party/
|
COPY --from=builder /go/minio/CREDITS /third_party/
|
||||||
COPY --from=0 /go/minio/dockerscripts/docker-entrypoint.sh /usr/bin/
|
COPY --from=builder /go/minio/dockerscripts/docker-entrypoint.sh /usr/bin/
|
||||||
|
|
||||||
RUN \
|
RUN \
|
||||||
apk add --no-cache ca-certificates 'curl>7.61.0' 'su-exec>=0.2' && \
|
apk add --no-cache ca-certificates 'curl>7.61.0' 'su-exec>=0.2' && \
|
||||||
|
|
@ -36,4 +35,4 @@ ENTRYPOINT ["/usr/bin/docker-entrypoint.sh"]
|
||||||
|
|
||||||
VOLUME ["/data"]
|
VOLUME ["/data"]
|
||||||
|
|
||||||
CMD ["minio"]
|
CMD ["minio"]
|
||||||
|
|
|
||||||
3
renovate.json
Normal file
3
renovate.json
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"$schema": "https://docs.renovatebot.com/renovate-schema.json"
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue